[cfe-commits] r146628 - in /cfe/trunk: lib/StaticAnalyzer/Core/CheckerRegistry.cpp test/Analysis/taint-tester.c

Anna Zaks ganna at apple.com
Wed Dec 14 17:36:04 PST 2011


Author: zaks
Date: Wed Dec 14 19:36:04 2011
New Revision: 146628

URL: http://llvm.org/viewvc/llvm-project?rev=146628&view=rev
Log:
[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.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
    cfe/trunk/test/Analysis/taint-tester.c

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp?rev=146628&r1=146627&r2=146628&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp Wed Dec 14 19:36:04 2011
@@ -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 @@
     if (opt.isEnabled())
       collected.insert(&*i);
     else
-      collected.erase(&*i);
+      collected.remove(&*i);
   }
 }
 

Modified: cfe/trunk/test/Analysis/taint-tester.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/taint-tester.c?rev=146628&r1=146627&r2=146628&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/taint-tester.c (original)
+++ cfe/trunk/test/Analysis/taint-tester.c Wed Dec 14 19:36:04 2011
@@ -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>
 





More information about the cfe-commits mailing list