summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-15 23:30:39 +0000
committerAlp Toker <alp@nuanti.com>2014-06-15 23:30:39 +0000
commitd4a3f0e8949647434d8c73e3b563a1cff0b73cfe (patch)
tree4512b77da6fc9930ad8d71f35259220d1790e214 /clang/lib/Sema/SemaInit.cpp
parentbaabe5091c63748d99bf59a1807c2879881b4af2 (diff)
downloadbcm5719-llvm-d4a3f0e8949647434d8c73e3b563a1cff0b73cfe.tar.gz
bcm5719-llvm-d4a3f0e8949647434d8c73e3b563a1cff0b73cfe.zip
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/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index e3225da7f71..3dfeb8ecd30 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -5078,8 +5078,7 @@ static void CheckCXX98CompatAccessibleCopy(Sema &S,
return;
SourceLocation Loc = getInitializationLoc(Entity, CurInitExpr);
- if (S.Diags.getDiagnosticLevel(diag::warn_cxx98_compat_temp_copy, Loc)
- == DiagnosticsEngine::Ignored)
+ if (S.Diags.isIgnored(diag::warn_cxx98_compat_temp_copy, Loc))
return;
// Find constructors which would have been considered.
OpenPOWER on IntegriCloud