diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-18 06:07:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-18 06:07:40 +0000 |
commit | 3de58149bda2f1f5c32254c464a78b63598c6cc5 (patch) | |
tree | 36fced70d3f4939e582558042fbd8237b2570839 | |
parent | eeb0415980735108bf3ce556ff2a51e21bfece43 (diff) | |
download | bcm5719-llvm-3de58149bda2f1f5c32254c464a78b63598c6cc5.tar.gz bcm5719-llvm-3de58149bda2f1f5c32254c464a78b63598c6cc5.zip |
eliminate dependence of strange "Diagnostic::Report" method,
delete huge trailing whitespace to fit in 80 cols.
llvm-svn: 59497
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 0663ddde417..bf99e6ba637 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/lib/Analysis/BugReporter.cpp @@ -576,9 +576,7 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, // FIXME: Maybe this should be an assertion. Are there cases // were it is not an EnumConstantDecl? - - EnumConstantDecl* D = dyn_cast<EnumConstantDecl>(DR->getDecl()); - + EnumConstantDecl* D = dyn_cast<EnumConstantDecl>(DR->getDecl()); if (D) { GetRawInt = false; os << D->getName(); @@ -806,9 +804,13 @@ void BugReporter::EmitBasicReport(const char* name, const char* category, SimpleBugType BT(name, category, 0); DiagCollector C(BT); Diagnostic& Diag = getDiagnostic(); - Diag.Report(&C, getContext().getFullLoc(Loc), + + DiagnosticClient *OldClient = Diag.getClient(); + Diag.setClient(&C); + Diag.Report(getContext().getFullLoc(Loc), Diag.getCustomDiagID(Diagnostic::Warning, str), 0, 0, RBeg, NumRanges); + Diag.setClient(OldClient); for (DiagCollector::iterator I = C.begin(), E = C.end(); I != E; ++I) EmitWarning(*I); |