diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-15 01:36:04 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-15 01:36:04 +0000 |
commit | 557a3829ebe0e36785b9a7679dc19dc67dbc7639 (patch) | |
tree | eec842a5dca0033c17242f4b2639c8cc6dd24e54 | |
parent | f8aba8c618920db8f6ef2db0c554b0c270503cef (diff) |
[analyzer] Ensure that the order in which checker callbacks are called
is deterministic.
Non-determinism was the reason for the test which caused the earlier
buildbot failures, so re-enable the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146628 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/StaticAnalyzer/Core/CheckerRegistry.cpp | 5 | ||||
-rw-r--r-- | test/Analysis/taint-tester.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/CheckerRegistry.cpp b/lib/StaticAnalyzer/Core/CheckerRegistry.cpp index 13401acf3d..9791e2ecbf 100644 --- a/lib/StaticAnalyzer/Core/CheckerRegistry.cpp +++ b/lib/StaticAnalyzer/Core/CheckerRegistry.cpp @@ -9,12 +9,13 @@ #include "clang/StaticAnalyzer/Core/CheckerRegistry.h" #include "clang/StaticAnalyzer/Core/CheckerOptInfo.h" +#include "llvm/ADT/SetVector.h" using namespace clang; using namespace ento; static const char PackageSeparator = '.'; -typedef llvm::DenseSet<const CheckerRegistry::CheckerInfo *> CheckerInfoSet; +typedef llvm::SetVector<const CheckerRegistry::CheckerInfo *> CheckerInfoSet; static bool checkerNameLT(const CheckerRegistry::CheckerInfo &a, @@ -72,7 +73,7 @@ static void collectCheckers(const CheckerRegistry::CheckerInfoList &checkers, if (opt.isEnabled()) collected.insert(&*i); else - collected.erase(&*i); + collected.remove(&*i); } } diff --git a/test/Analysis/taint-tester.c b/test/Analysis/taint-tester.c index ac8967cddd..e3c6723d4e 100644 --- a/test/Analysis/taint-tester.c +++ b/test/Analysis/taint-tester.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest %s +// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest %s -verify #include <stdarg.h> |