]> granicus.if.org Git - clang/commitdiff
Rename instance variable to avoid name conflict with parameters, and modify addTransi...
authorTed Kremenek <kremenek@apple.com>
Fri, 4 Dec 2009 06:57:49 +0000 (06:57 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 4 Dec 2009 06:57:49 +0000 (06:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90552 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/Checker.h
lib/Analysis/Checker.cpp

index b380f1bf02fdf6acff7f7ab79dd141c5841ceefb..afe563cd8ce9b285883136a216aa45754bf65f22 100644 (file)
@@ -39,7 +39,7 @@ class CheckerContext {
   SaveAndRestore<const void*> OldTag;
   SaveAndRestore<ProgramPoint::Kind> OldPointKind;
   SaveOr OldHasGen;
-  const GRState *state;
+  const GRState *ST;
   const Stmt *statement;
   const unsigned size;
   bool DoneEvaluating; // FIXME: This is not a permanent API change.
@@ -53,7 +53,7 @@ public:
       OldTag(B.Tag, tag),
       OldPointKind(B.PointKind, K),
       OldHasGen(B.HasGeneratedNode),
-      state(st), statement(stmt), size(Dst.size()) {}
+      ST(st), statement(stmt), size(Dst.size()) {}
 
   ~CheckerContext();
   
@@ -68,7 +68,7 @@ public:
   ExplodedNodeSet &getNodeSet() { return Dst; }
   GRStmtNodeBuilder &getNodeBuilder() { return B; }
   ExplodedNode *&getPredecessor() { return Pred; }
-  const GRState *getState() { return state ? state : B.GetState(Pred); }
+  const GRState *getState() { return ST ? ST : B.GetState(Pred); }
 
   ASTContext &getASTContext() {
     return Eng.getContext();
@@ -126,8 +126,7 @@ public:
   
   void addTransition(const GRState *state) {
     assert(state);
-    if (state != getState() || 
-        (state && state != B.GetState(Pred)))
+    if (state != getState() || (ST && ST != B.GetState(Pred)))
       GenerateNode(state, true);
     else
       Dst.Add(Pred);
index 0d907e501686b9fa33ef3136137bf31aabdbd002..fb9d04d947b7ba188c5a4fdc5aaf807c192356f3 100644 (file)
@@ -24,10 +24,10 @@ CheckerContext::~CheckerContext() {
   // if we are building sinks or we generated a node and decided to not
   // add it as a transition.
   if (Dst.size() == size && !B.BuildSinks && !B.HasGeneratedNode) {
-    if (state && state != B.GetState(Pred)) {
+    if (ST && ST != B.GetState(Pred)) {
       static int autoTransitionTag = 0;
       B.Tag = &autoTransitionTag;
-      addTransition(state);
+      addTransition(ST);
     }
     else
       Dst.Add(Pred);