Also show notes about the taken path in TextPathDiagnostics.

llvm-svn: 120783
This commit is contained in:
Argyrios Kyrtzidis 2010-12-03 02:03:26 +00:00
parent 36110d5d1a
commit 833be2ddd8
1 changed files with 4 additions and 7 deletions

View File

@ -38,7 +38,7 @@ public:
return "TextPathDiagnostics";
}
PathGenerationScheme getGenerationScheme() const { return Extensive; }
PathGenerationScheme getGenerationScheme() const { return Minimal; }
bool supportsLogicalOpControlFlow() const { return true; }
bool supportsAllBlockEdges() const { return true; }
virtual bool useVerboseDescription() const { return true; }
@ -62,11 +62,8 @@ void TextPathDiagnostics::HandlePathDiagnostic(const PathDiagnostic* D) {
}
for (PathDiagnostic::const_iterator I=D->begin(), E=D->end(); I != E; ++I) {
if (isa<PathDiagnosticEventPiece>(*I)) {
PathDiagnosticEventPiece &event = cast<PathDiagnosticEventPiece>(*I);
unsigned diagID = Diag.getDiagnosticIDs()->getCustomDiagID(
DiagnosticIDs::Note, event.getString());
Diag.Report(event.getLocation().asLocation(), diagID);
}
unsigned diagID = Diag.getDiagnosticIDs()->getCustomDiagID(
DiagnosticIDs::Note, I->getString());
Diag.Report(I->getLocation().asLocation(), diagID);
}
}