[cfe-commits] r62885 - /cfe/trunk/lib/Analysis/BugReporter.cpp
Ted Kremenek
kremenek at apple.com
Fri Jan 23 14:22:49 PST 2009
Author: kremenek
Date: Fri Jan 23 16:22:49 2009
New Revision: 62885
URL: http://llvm.org/viewvc/llvm-project?rev=62885&view=rev
Log:
Output summary diagnostic for each bug report.
Modified:
cfe/trunk/lib/Analysis/BugReporter.cpp
Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=62885&r1=62884&r2=62885&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Fri Jan 23 16:22:49 2009
@@ -738,19 +738,20 @@
PathDiagnosticClient* PD = getPathDiagnosticClient();
if (PD && !D->empty()) {
- PD->HandlePathDiagnostic(D.take());
- return;
+ PD->HandlePathDiagnostic(D.take());
+ // Output a diagnostic summarizing the report.
+ Diagnostic& Diag = getDiagnostic();
+ Diag.Report(R.getLocation(getSourceManager()),
+ Diag.getCustomDiagID(Diagnostic::Warning,R.getDescription()));
+ return;
}
- // We don't have a PathDiagnosticClient, but we can still emit a single
+ // This isn't a bug with a path, but we can still emit a single
// line diagnostic. Determine the location.
-
FullSourceLoc L = D->empty() ? R.getLocation(getSourceManager())
: D->back()->getLocation();
-
- // Determine the range.
-
+ // Determine the range.
const SourceRange *Beg, *End;
if (!D->empty()) {
@@ -768,6 +769,10 @@
D->push_back(piece);
PD->HandlePathDiagnostic(D.take());
+
+ // Output a diagnostic summarizing the report.
+ Diagnostic& Diag = getDiagnostic();
+ Diag.Report(L,Diag.getCustomDiagID(Diagnostic::Warning,R.getDescription()));
return;
}
else {
More information about the cfe-commits
mailing list