We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0312677 commit 8765436Copy full SHA for 8765436
clang/lib/Lex/HeaderSearch.cpp
@@ -888,10 +888,11 @@ void HeaderSearch::DiagnoseHeaderShadowing(
888
bool isAngled, int IncluderLoopIndex, ConstSearchDirIterator MainLoopIt) {
889
890
if (Diags.isIgnored(diag::warn_header_shadowing, IncludeLoc) ||
891
- DiagnosedShadowing || (getFileInfo(*FE).DirInfo != SrcMgr::C_User)) {
892
- DiagnosedShadowing = true;
+ DiagnosedShadowing)
+ return;
893
+ // Ignore diagnostics from system headers.
894
+ if (MainLoopIt && MainLoopIt->isSystemHeaderDirectory())
895
return;
- }
896
897
DiagnosedShadowing = true;
898
0 commit comments