[cfe-commits] r50701 - /cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
Ted Kremenek
kremenek at apple.com
Mon May 5 20:26:54 PDT 2008
Author: kremenek
Date: Mon May 5 22:26:52 2008
New Revision: 50701
URL: http://llvm.org/viewvc/llvm-project?rev=50701&view=rev
Log:
Fixed subtle bug in the an GRAuditor object could mark a node as a sink
after it was already added to the destination NodeSet.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h?rev=50701&r1=50700&r2=50701&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h Mon May 5 22:26:52 2008
@@ -32,14 +32,14 @@
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 @@
if (BuildSinks)
N->markAsSink();
else {
- Dst.Add(N);
-
for ( ; AB != AE; ++AB)
if ((*AB)->Audit(N))
- N->markAsSink();
+ N->markAsSink();
+
+ Dst.Add(N);
}
}
More information about the cfe-commits
mailing list