summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-05-06 03:26:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-05-06 03:26:52 +0000
commitbc51f71c5bacb8b851807e96c4a2033f7c91c76d (patch)
tree14ade86de9ecc0da32be5530276b72debcfe83e8
parent821537ecdb380bf599a39a547784f64557a30aba (diff)
downloadbcm5719-llvm-bc51f71c5bacb8b851807e96c4a2033f7c91c76d.tar.gz
bcm5719-llvm-bc51f71c5bacb8b851807e96c4a2033f7c91c76d.zip
Fixed subtle bug in the an GRAuditor object could mark a node as a sink
after it was already added to the destination NodeSet. llvm-svn: 50701
-rw-r--r--clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h
index bef2e2c0b60..aa8ca231b0f 100644
--- a/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h
@@ -32,14 +32,14 @@ class GREndPathNodeBuilderImpl;
class GRWorkList;
//===----------------------------------------------------------------------===//
-/// GRCoreEngineImpl - Implements the core logic of the graph-reachability analysis.
-/// It traverses the CFG and generates the ExplodedGraph. Program "states"
-/// are treated as opaque void pointers. The template class GRCoreEngine
-/// (which subclasses GRCoreEngineImpl) provides the matching component
-/// to the engine that knows the actual types for states. Note that this
-/// engine only dispatches to transfer functions as the statement and
-/// block-level. The analyses themselves must implement any transfer
-/// function logic and the sub-expression level (if any).
+/// GRCoreEngineImpl - Implements the core logic of the graph-reachability
+/// analysis. It traverses the CFG and generates the ExplodedGraph.
+/// Program "states" are treated as opaque void pointers.
+/// The template class GRCoreEngine (which subclasses GRCoreEngineImpl)
+/// provides the matching component to the engine that knows the actual types
+/// for states. Note that this engine only dispatches to transfer functions
+/// at the statement and block-level. The analyses themselves must implement
+/// any transfer function logic and the sub-expression level (if any).
class GRCoreEngineImpl {
protected:
friend class GRStmtNodeBuilderImpl;
@@ -263,11 +263,11 @@ public:
if (BuildSinks)
N->markAsSink();
else {
- Dst.Add(N);
-
for ( ; AB != AE; ++AB)
if ((*AB)->Audit(N))
- N->markAsSink();
+ N->markAsSink();
+
+ Dst.Add(N);
}
}
OpenPOWER on IntegriCloud