diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
commit | d00406486421143c5e4eb79f9ce97e30442b1ab2 (patch) | |
tree | eb2ff8461358578c978f17ddfa7f597b9f6a1022 /clang/lib/Rewrite/HTMLRewrite.cpp | |
parent | 4fadc5b20a3afbad542e0841692dc851d0507136 (diff) | |
download | bcm5719-llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.gz bcm5719-llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.zip |
Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
Diffstat (limited to 'clang/lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r-- | clang/lib/Rewrite/HTMLRewrite.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp index b461df462e2..e6b9aa367ad 100644 --- a/clang/lib/Rewrite/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/HTMLRewrite.cpp @@ -486,7 +486,8 @@ void html::HighlightMacros(Rewriter &R, FileID FID, const Preprocessor& PP) { // Temporarily change the diagnostics object so that we ignore any generated // diagnostics from this pass. - Diagnostic TmpDiags(new IgnoringDiagClient); + Diagnostic TmpDiags(PP.getDiagnostics().getDiagnosticIDs(), + new IgnoringDiagClient); // FIXME: This is a huge hack; we reuse the input preprocessor because we want // its state, but we aren't actually changing it (we hope). This should really |