diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-15 23:30:39 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-15 23:30:39 +0000 |
commit | d4a3f0e8949647434d8c73e3b563a1cff0b73cfe (patch) | |
tree | 4512b77da6fc9930ad8d71f35259220d1790e214 /clang/lib/Lex/HeaderSearch.cpp | |
parent | baabe5091c63748d99bf59a1807c2879881b4af2 (diff) | |
download | llvm-d4a3f0e8949647434d8c73e3b563a1cff0b73cfe.zip llvm-d4a3f0e8949647434d8c73e3b563a1cff0b73cfe.tar.gz llvm-d4a3f0e8949647434d8c73e3b563a1cff0b73cfe.tar.bz2 |
Hide the concept of diagnostic levels from lex, parse and sema
The compilation pipeline doesn't actually need to know about the high-level
concept of diagnostic mappings, and hiding the final computed level presents
several simplifications and other potential benefits.
The only exceptions are opportunistic checks to see whether expensive code
paths can be avoided for diagnostics that are guaranteed to be ignored at a
certain SourceLocation.
This commit formalizes that invariant by introducing and using
DiagnosticsEngine::isIgnored() in place of individual level checks throughout
lex, parse and sema.
llvm-svn: 211005
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index a283f69..c12d731 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -666,9 +666,7 @@ const FileEntry *HeaderSearch::LookupFile( // Otherwise, we found the path via MSVC header search rules. If // -Wmsvc-include is enabled, we have to keep searching to see if we // would've found this header in -I or -isystem directories. - if (Diags.getDiagnosticLevel(diag::ext_pp_include_search_ms, - IncludeLoc) == - DiagnosticsEngine::Ignored) { + if (Diags.isIgnored(diag::ext_pp_include_search_ms, IncludeLoc)) { return FE; } else { MSFE = FE; |