aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-08-02 00:41:43 +0000
committerAnna Zaks <ganna@apple.com>2012-08-02 00:41:43 +0000
commit0eb6c37dd4e4ad8fa2363003dea270f9fd6c2969 (patch)
treea2b25157b57cc88cef7cdc44bfec98f8a17913cb
parent2a84b8bd106db5c878ab7bbaa848f49bfd6d42f9 (diff)
[analyzer] Flush bug reports in deterministic order.
This makes the diagnostic output order deterministic. 1) This makes order of text diagnostics consistent from run to run. 2) Also resulted in different bugs being reported (from one run to another) with plist-html output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161151 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp
index 12479ca53a..1eaf1f9f76 100644
--- a/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -1536,9 +1536,10 @@ void BugReporter::FlushReports() {
I = bugTypes.begin(), E = bugTypes.end(); I != E; ++I)
const_cast<BugType*>(*I)->FlushReports(*this);
- typedef llvm::FoldingSet<BugReportEquivClass> SetTy;
- for (SetTy::iterator EI=EQClasses.begin(), EE=EQClasses.end(); EI!=EE;++EI){
- BugReportEquivClass& EQ = *EI;
+ typedef std::vector<BugReportEquivClass *> ContVecTy;
+ for (ContVecTy::iterator EI=EQClassesVector.begin(), EE=EQClassesVector.end();
+ EI != EE; ++EI){
+ BugReportEquivClass& EQ = **EI;
FlushReport(EQ);
}