diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-04 12:31:12 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-04 12:31:12 +0000 |
commit | 3307c508c932ad6f9686b15f187c06da21306c27 (patch) | |
tree | 0e57cb0912a3e0c8fdc14f72db3eb2fdfd16e008 /clang/lib/AST/Decl.cpp | |
parent | 728ed3f3869d5f781c9e3f140bc2a5dbd911f9ab (diff) | |
download | bcm5719-llvm-3307c508c932ad6f9686b15f187c06da21306c27.tar.gz bcm5719-llvm-3307c508c932ad6f9686b15f187c06da21306c27.zip |
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.
Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.
llvm-svn: 149781
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index aa7bb0812a3..123b14c0560 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -25,6 +25,7 @@ #include "clang/Basic/Builtins.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/Module.h" +#include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/Specifiers.h" #include "clang/Basic/TargetInfo.h" #include "llvm/Support/ErrorHandling.h" @@ -2959,3 +2960,17 @@ SourceRange ImportDecl::getSourceRange() const { return SourceRange(getLocation(), getIdentifierLocs().back()); } + +const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, + const NamedDecl* ND) { + DB.AddTaggedVal(reinterpret_cast<intptr_t>(ND), + DiagnosticsEngine::ak_nameddecl); + return DB; +} + +const PartialDiagnostic &clang::operator<<(const PartialDiagnostic &PD, + const NamedDecl* ND) { + PD.AddTaggedVal(reinterpret_cast<intptr_t>(ND), + DiagnosticsEngine::ak_nameddecl); + return PD; +} |