]> granicus.if.org Git - clang/commit
Hide the concept of diagnostic levels from lex, parse and sema
authorAlp Toker <alp@nuanti.com>
Sun, 15 Jun 2014 23:30:39 +0000 (23:30 +0000)
committerAlp Toker <alp@nuanti.com>
Sun, 15 Jun 2014 23:30:39 +0000 (23:30 +0000)
commit7225802bf998624a54e48d81e2d6241cfc8c2b2b
treeb918afa8ea25c87835b43f03cde4dda107d575d2
parentaf3883a24440561c8d82cf26ca6f7bffe2eb4c4d
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211005 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/clang/Basic/Diagnostic.h
lib/Lex/HeaderSearch.cpp
lib/Lex/Lexer.cpp
lib/Lex/PPDirectives.cpp
lib/Lex/PPLexerChange.cpp
lib/Parse/ParsePragma.cpp
lib/Sema/AnalysisBasedWarnings.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaCast.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprMember.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaPseudoObject.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/SemaTemplate.cpp