forked from OSchip/llvm-project
[analyzer] Don't repeat a bug equivalence class if every report is invalid.
I removed this check in the recursion->iteration commit, but forgot that generatePathDiagnostic may be called multiple times if there are multiple PathDiagnosticConsumers. llvm-svn: 177214
This commit is contained in:
parent
50b5ee5023
commit
5315931105
|
@ -2114,13 +2114,23 @@ bool GRBugReporter::generatePathDiagnostic(PathDiagnostic& PD,
|
|||
ArrayRef<BugReport *> &bugReports) {
|
||||
assert(!bugReports.empty());
|
||||
|
||||
bool HasValid = false;
|
||||
SmallVector<const ExplodedNode *, 32> errorNodes;
|
||||
for (ArrayRef<BugReport*>::iterator I = bugReports.begin(),
|
||||
E = bugReports.end();
|
||||
I != E; ++I) {
|
||||
errorNodes.push_back((*I)->getErrorNode());
|
||||
E = bugReports.end(); I != E; ++I) {
|
||||
if ((*I)->isValid()) {
|
||||
HasValid = true;
|
||||
errorNodes.push_back((*I)->getErrorNode());
|
||||
} else {
|
||||
errorNodes.push_back(0);
|
||||
}
|
||||
}
|
||||
|
||||
// If all the reports have been marked invalid by a previous path generation,
|
||||
// we're done.
|
||||
if (!HasValid)
|
||||
return false;
|
||||
|
||||
typedef PathDiagnosticConsumer::PathGenerationScheme PathGenerationScheme;
|
||||
PathGenerationScheme ActiveScheme = PC.getGenerationScheme();
|
||||
|
||||
|
|
Loading…
Reference in New Issue