[cfe-commits] r101239 - in /cfe/trunk: include/clang/Checker/PathSensitive/GRCoreEngine.h lib/Checker/GRCoreEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Apr 13 23:35:09 PDT 2010


Author: zhongxingxu
Date: Wed Apr 14 01:35:09 2010
New Revision: 101239

URL: http://llvm.org/viewvc/llvm-project?rev=101239&view=rev
Log:
Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h
    cfe/trunk/lib/Checker/GRCoreEngine.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h?rev=101239&r1=101238&r2=101239&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/GRCoreEngine.h Wed Apr 14 01:35:09 2010
@@ -239,31 +239,7 @@
   }
 
   ExplodedNode* MakeNode(ExplodedNodeSet& Dst, Stmt* S, ExplodedNode* Pred,
-                         const GRState* St, ProgramPoint::Kind K) {
-
-    const GRState* PredState = GetState(Pred);
-
-    // If the state hasn't changed, don't generate a new node.
-    if (!BuildSinks && St == PredState && Auditor == 0) {
-      Dst.Add(Pred);
-      return NULL;
-    }
-
-    ExplodedNode* N = generateNode(S, St, Pred, K);
-
-    if (N) {
-      if (BuildSinks)
-        N->markAsSink();
-      else {
-        if (Auditor && Auditor->Audit(N, Mgr))
-          N->markAsSink();
-
-        Dst.Add(N);
-      }
-    }
-
-    return N;
-  }
+                         const GRState* St, ProgramPoint::Kind K);
 
   ExplodedNode* MakeSinkNode(ExplodedNodeSet& Dst, Stmt* S,
                        ExplodedNode* Pred, const GRState* St) {
@@ -273,7 +249,6 @@
     BuildSinks = Tmp;
     return N;
   }
-
 };
 
 class GRBranchNodeBuilder {

Modified: cfe/trunk/lib/Checker/GRCoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRCoreEngine.cpp?rev=101239&r1=101238&r2=101239&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRCoreEngine.cpp Wed Apr 14 01:35:09 2010
@@ -455,6 +455,33 @@
     Eng.WList->Enqueue(Succ, B, Idx+1);
 }
 
+ExplodedNode* GRStmtNodeBuilder::MakeNode(ExplodedNodeSet& Dst, Stmt* S, 
+                                          ExplodedNode* Pred, const GRState* St,
+                                          ProgramPoint::Kind K) {
+  const GRState* PredState = GetState(Pred);
+
+  // If the state hasn't changed, don't generate a new node.
+  if (!BuildSinks && St == PredState && Auditor == 0) {
+    Dst.Add(Pred);
+    return NULL;
+  }
+
+  ExplodedNode* N = generateNode(S, St, Pred, K);
+
+  if (N) {
+    if (BuildSinks)
+      N->markAsSink();
+    else {
+      if (Auditor && Auditor->Audit(N, Mgr))
+        N->markAsSink();
+      
+      Dst.Add(N);
+    }
+  }
+  
+  return N;
+}
+
 static ProgramPoint GetProgramPoint(const Stmt *S, ProgramPoint::Kind K,
                                     const LocationContext *LC, const void *tag){
   switch (K) {





More information about the cfe-commits mailing list