================
@@ -959,6 +959,10 @@ def warn_quoted_include_in_framework_header : Warning<
def warn_framework_include_private_from_public : Warning<
"public framework header includes private framework header '%0'"
>, InGroup<FrameworkIncludePrivateFromPublic>;
+def warn_header_shadowing : Warning<
+ "multiple candidates for header '%0' found; "
+ "directory '%1' chosen, ignoring '%2' and others">,
+ InGroup<ShadowHeader>, DefaultIgnore;
----------------
ecnelises wrote:
I'm still thinking about whether here needs change if `len(shadowed headers) ==
1`.
Maybe write as following:
```
def warn_header_shadowing : Warning<
"multiple candidates for header '%0' found; "
"directory '%1' chosen, ignoring '%2'%select{| and others}3"">,
InGroup<ShadowHeader>, DefaultIgnore;
```
then in Cpp code:
```cpp
Diags.Report(IncludeLoc, diag::warn_header_shadowing)
<< Filename << (*FE).getDir().getName()
<< IncluderAndDir.second.getName()
<< (Count > 1);
```
But this is not a blocker.
https://github.com/llvm/llvm-project/pull/162491
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits