[cfe-commits] r122035 - in /cfe/trunk: include/clang/Checker/PathSensitive/GRExprEngine.h lib/Analysis/CFG.cpp lib/Checker/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Thu Dec 16 20:44:39 PST 2010


Author: kremenek
Date: Thu Dec 16 22:44:39 2010
New Revision: 122035

URL: http://llvm.org/viewvc/llvm-project?rev=122035&view=rev
Log:
Rename several methods/functions in the analyzer
to start with lowercase characters.  No
functionality change.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/GRExprEngine.h
    cfe/trunk/lib/Analysis/CFG.cpp
    cfe/trunk/lib/Checker/GRExprEngine.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/GRExprEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/GRExprEngine.h?rev=122035&r1=122034&r2=122035&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/GRExprEngine.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/GRExprEngine.h Thu Dec 16 22:44:39 2010
@@ -60,8 +60,8 @@
   ///  variables and symbols (as determined by a liveness analysis).
   const GRState* CleanedState;
 
-  /// CurrentStmt - The current block-level statement.
-  const Stmt* CurrentStmt;
+  /// currentStmt - The current block-level statement.
+  const Stmt* currentStmt;
 
   // Obj-C Class Identifiers.
   IdentifierInfo* NSExceptionII;

Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=122035&r1=122034&r2=122035&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Thu Dec 16 22:44:39 2010
@@ -379,12 +379,12 @@
   void prependAutomaticObjDtorsWithTerminator(CFGBlock* Blk,
       LocalScope::const_iterator B, LocalScope::const_iterator E);
 
-  void AddSuccessor(CFGBlock *B, CFGBlock *S) {
+  void addSuccessor(CFGBlock *B, CFGBlock *S) {
     B->addSuccessor(S, cfg->getBumpVectorContext());
   }
 
   /// TryResult - a class representing a variant over the values
-  ///  'true', 'false', or 'unknown'.  This is returned by TryEvaluateBool,
+  ///  'true', 'false', or 'unknown'.  This is returned by tryEvaluateBool,
   ///  and is used by the CFGBuilder to decide if a branch condition
   ///  can be decided up front during CFG construction.
   class TryResult {
@@ -402,9 +402,9 @@
     }
   };
 
-  /// TryEvaluateBool - Try and evaluate the Stmt and return 0 or 1
+  /// tryEvaluateBool - Try and evaluate the Stmt and return 0 or 1
   /// if we can evaluate to a known value, otherwise return -1.
-  TryResult TryEvaluateBool(Expr *S) {
+  TryResult tryEvaluateBool(Expr *S) {
     if (!BuildOpts.PruneTriviallyFalseEdges)
       return TryResult();
 
@@ -491,7 +491,7 @@
 
     JumpTarget JT = LI->second;
     prependAutomaticObjDtorsWithTerminator(B, I->ScopePos, JT.ScopePos);
-    AddSuccessor(B, JT.Block);
+    addSuccessor(B, JT.Block);
   }
 
   // Add successors to the Indirect Goto Dispatch block (if we have one).
@@ -506,7 +506,7 @@
       // at an incomplete AST.  Handle this by not registering a successor.
       if (LI == LabelMap.end()) continue;
       
-      AddSuccessor(B, LI->second.Block);
+      addSuccessor(B, LI->second.Block);
     }
 
   // Create an empty entry block that has no predecessors.
@@ -520,7 +520,7 @@
 CFGBlock* CFGBuilder::createBlock(bool add_successor) {
   CFGBlock* B = cfg->createBlock();
   if (add_successor && Succ)
-    AddSuccessor(B, Succ);
+    addSuccessor(B, Succ);
   return B;
 }
 
@@ -977,18 +977,18 @@
     }
 
     // See if this is a known constant.
-    TryResult KnownVal = TryEvaluateBool(B->getLHS());
+    TryResult KnownVal = tryEvaluateBool(B->getLHS());
     if (KnownVal.isKnown() && (B->getOpcode() == BO_LOr))
       KnownVal.negate();
 
     // Now link the LHSBlock with RHSBlock.
     if (B->getOpcode() == BO_LOr) {
-      AddSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
-      AddSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
+      addSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
+      addSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
     } else {
       assert(B->getOpcode() == BO_LAnd);
-      AddSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
-      AddSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
+      addSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
+      addSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
     }
 
     // Generate the blocks for evaluating the LHS.
@@ -1047,7 +1047,7 @@
   // AST.  This means that the CFG cannot be constructed.
   if (BreakJumpTarget.Block) {
     addAutomaticObjDtors(ScopePos, BreakJumpTarget.ScopePos, B);
-    AddSuccessor(Block, BreakJumpTarget.Block);
+    addSuccessor(Block, BreakJumpTarget.Block);
   } else
     badCFG = true;
 
@@ -1110,14 +1110,14 @@
 
   if (NoReturn) {
     // Wire this to the exit block directly.
-    AddSuccessor(Block, &cfg->getExit());
+    addSuccessor(Block, &cfg->getExit());
   }
   if (AddEHEdge) {
     // Add exceptional edges.
     if (TryTerminatedBlock)
-      AddSuccessor(Block, TryTerminatedBlock);
+      addSuccessor(Block, TryTerminatedBlock);
     else
-      AddSuccessor(Block, &cfg->getExit());
+      addSuccessor(Block, &cfg->getExit());
   }
 
   return VisitChildren(C);
@@ -1145,9 +1145,9 @@
 
   Block = createBlock(false);
   // See if this is a known constant.
-  const TryResult& KnownVal = TryEvaluateBool(C->getCond());
-  AddSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
-  AddSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
+  const TryResult& KnownVal = tryEvaluateBool(C->getCond());
+  addSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
+  addSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
   Block->setTerminator(C);
   return addStmt(C->getCond());
 }
@@ -1206,15 +1206,15 @@
   Block = createBlock(false);
 
   // See if this is a known constant.
-  const TryResult& KnownVal = TryEvaluateBool(C->getCond());
+  const TryResult& KnownVal = tryEvaluateBool(C->getCond());
   if (LHSBlock) {
-    AddSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
+    addSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
   } else {
     if (KnownVal.isFalse()) {
       // If we know the condition is false, add NULL as the successor for
       // the block containing the condition.  In this case, the confluence
       // block will have just one predecessor.
-      AddSuccessor(Block, 0);
+      addSuccessor(Block, 0);
       assert(ConfluenceBlock->pred_size() == 1);
     } else {
       // If we have no LHS expression, add the ConfluenceBlock as a direct
@@ -1223,7 +1223,7 @@
       // the RHSBlock will have been added to the succcessors already, and we
       // want the first predecessor to the the block containing the expression
       // for the case when the ternary expression evaluates to true.
-      AddSuccessor(Block, ConfluenceBlock);
+      addSuccessor(Block, ConfluenceBlock);
       // Note that there can possibly only be one predecessor if one of the
       // subexpressions resulted in calling a noreturn function.
       std::reverse(ConfluenceBlock->pred_begin(),
@@ -1231,7 +1231,7 @@
     }
   }
 
-  AddSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
+  addSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
   Block->setTerminator(C);
   return addStmt(C->getCond());
 }
@@ -1392,7 +1392,7 @@
       // Create an empty block so we can distinguish between true and false
       // branches in path-sensitive analyses.
       ThenBlock = createBlock(false);
-      AddSuccessor(ThenBlock, sv.get());
+      addSuccessor(ThenBlock, sv.get());
     } else if (Block) {
       if (badCFG)
         return 0;
@@ -1406,11 +1406,11 @@
   Block->setTerminator(I);
 
   // See if this is a known constant.
-  const TryResult &KnownVal = TryEvaluateBool(I->getCond());
+  const TryResult &KnownVal = tryEvaluateBool(I->getCond());
 
   // Now add the successors.
-  AddSuccessor(Block, KnownVal.isFalse() ? NULL : ThenBlock);
-  AddSuccessor(Block, KnownVal.isTrue()? NULL : ElseBlock);
+  addSuccessor(Block, KnownVal.isFalse() ? NULL : ThenBlock);
+  addSuccessor(Block, KnownVal.isTrue()? NULL : ElseBlock);
 
   // Add the condition as the last statement in the new block.  This may create
   // new blocks as the condition may contain control-flow.  Any newly created
@@ -1444,7 +1444,7 @@
 
   // The Exit block is the only successor.
   addAutomaticObjDtors(ScopePos, LocalScope::const_iterator(), R);
-  AddSuccessor(Block, &cfg->getExit());
+  addSuccessor(Block, &cfg->getExit());
 
   // Add the return statement to the block.  This may create new blocks if R
   // contains control-flow (short-circuit operations).
@@ -1495,7 +1495,7 @@
   else {
     JumpTarget JT = I->second;
     addAutomaticObjDtors(ScopePos, JT.ScopePos, G);
-    AddSuccessor(Block, JT.Block);
+    addSuccessor(Block, JT.Block);
   }
 
   return Block;
@@ -1577,7 +1577,7 @@
   TryResult KnownVal(true);
 
   if (F->getCond())
-    KnownVal = TryEvaluateBool(F->getCond());
+    KnownVal = tryEvaluateBool(F->getCond());
 
   // Now create the loop body.
   {
@@ -1633,12 +1633,12 @@
       return 0;
 
     // This new body block is a successor to our "exit" condition block.
-    AddSuccessor(ExitConditionBlock, KnownVal.isFalse() ? NULL : BodyBlock);
+    addSuccessor(ExitConditionBlock, KnownVal.isFalse() ? NULL : BodyBlock);
   }
 
   // Link up the condition block with the code that follows the loop.  (the
   // false branch).
-  AddSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
+  addSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
 
   // If the loop contains initialization, create a new block for those
   // statements.  This block can also contain statements that precede the loop.
@@ -1752,12 +1752,12 @@
     }
 
     // This new body block is a successor to our "exit" condition block.
-    AddSuccessor(ExitConditionBlock, BodyBlock);
+    addSuccessor(ExitConditionBlock, BodyBlock);
   }
 
   // Link up the condition block with the code that follows the loop.
   // (the false branch).
-  AddSuccessor(ExitConditionBlock, LoopSuccessor);
+  addSuccessor(ExitConditionBlock, LoopSuccessor);
 
   // Now create a prologue block to contain the collection expression.
   Block = createBlock();
@@ -1857,7 +1857,7 @@
   Succ = EntryConditionBlock;
 
   // See if this is a known constant.
-  const TryResult& KnownVal = TryEvaluateBool(W->getCond());
+  const TryResult& KnownVal = tryEvaluateBool(W->getCond());
 
   // Process the loop body.
   {
@@ -1901,12 +1901,12 @@
     }
 
     // Add the loop body entry as a successor to the condition.
-    AddSuccessor(ExitConditionBlock, KnownVal.isFalse() ? NULL : BodyBlock);
+    addSuccessor(ExitConditionBlock, KnownVal.isFalse() ? NULL : BodyBlock);
   }
 
   // Link up the condition block with the code that follows the loop.  (the
   // false branch).
-  AddSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
+  addSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
 
   // There can be no more statements in the condition block since we loop back
   // to this block.  NULL out Block to force lazy creation of another block.
@@ -1936,7 +1936,7 @@
   Block = createBlock(false);
 
   // The Exit block is the only successor.
-  AddSuccessor(Block, &cfg->getExit());
+  addSuccessor(Block, &cfg->getExit());
 
   // Add the statement to the block.  This may create new blocks if S contains
   // control-flow (short-circuit operations).
@@ -1953,10 +1953,10 @@
 
   if (TryTerminatedBlock)
     // The current try statement is the only successor.
-    AddSuccessor(Block, TryTerminatedBlock);
+    addSuccessor(Block, TryTerminatedBlock);
   else
     // otherwise the Exit block is the only successor.
-    AddSuccessor(Block, &cfg->getExit());
+    addSuccessor(Block, &cfg->getExit());
 
   // Add the statement to the block.  This may create new blocks if S contains
   // control-flow (short-circuit operations).
@@ -1999,7 +1999,7 @@
   Succ = EntryConditionBlock;
 
   // See if this is a known constant.
-  const TryResult &KnownVal = TryEvaluateBool(D->getCond());
+  const TryResult &KnownVal = tryEvaluateBool(D->getCond());
 
   // Process the loop body.
   CFGBlock* BodyBlock = NULL;
@@ -2047,15 +2047,15 @@
       LoopBackBlock->setLoopTarget(D);
 
       // Add the loop body entry as a successor to the condition.
-      AddSuccessor(ExitConditionBlock, LoopBackBlock);
+      addSuccessor(ExitConditionBlock, LoopBackBlock);
     }
     else
-      AddSuccessor(ExitConditionBlock, NULL);
+      addSuccessor(ExitConditionBlock, NULL);
   }
 
   // Link up the condition block with the code that follows the loop.
   // (the false branch).
-  AddSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
+  addSuccessor(ExitConditionBlock, KnownVal.isTrue() ? NULL : LoopSuccessor);
 
   // There can be no more statements in the body block(s) since we loop back to
   // the body.  NULL out Block to force lazy creation of another block.
@@ -2080,7 +2080,7 @@
   // incomplete AST.  This means the CFG cannot be constructed.
   if (ContinueJumpTarget.Block) {
     addAutomaticObjDtors(ScopePos, ContinueJumpTarget.ScopePos, C);
-    AddSuccessor(Block, ContinueJumpTarget.Block);
+    addSuccessor(Block, ContinueJumpTarget.Block);
   } else
     badCFG = true;
 
@@ -2175,7 +2175,7 @@
 
   // If we have no "default:" case, the default transition is to the code
   // following the switch body.
-  AddSuccessor(SwitchTerminatedBlock, DefaultCaseBlock);
+  addSuccessor(SwitchTerminatedBlock, DefaultCaseBlock);
 
   // Add the terminator and condition in the switch block.
   SwitchTerminatedBlock->setTerminator(Terminator);
@@ -2206,16 +2206,16 @@
     // (which can blow out the stack), manually unroll and create blocks
     // along the way.
     while (isa<CaseStmt>(Sub)) {
-      CFGBlock *CurrentBlock = createBlock(false);
-      CurrentBlock->setLabel(CS);
+      CFGBlock *currentBlock = createBlock(false);
+      currentBlock->setLabel(CS);
 
       if (TopBlock)
-        AddSuccessor(LastBlock, CurrentBlock);
+        addSuccessor(LastBlock, currentBlock);
       else
-        TopBlock = CurrentBlock;
+        TopBlock = currentBlock;
 
-      AddSuccessor(SwitchTerminatedBlock, CurrentBlock);
-      LastBlock = CurrentBlock;
+      addSuccessor(SwitchTerminatedBlock, currentBlock);
+      LastBlock = currentBlock;
 
       CS = cast<CaseStmt>(Sub);
       Sub = CS->getSubStmt();
@@ -2238,13 +2238,13 @@
   // Add this block to the list of successors for the block with the switch
   // statement.
   assert(SwitchTerminatedBlock);
-  AddSuccessor(SwitchTerminatedBlock, CaseBlock);
+  addSuccessor(SwitchTerminatedBlock, CaseBlock);
 
   // We set Block to NULL to allow lazy creation of a new block (if necessary)
   Block = NULL;
 
   if (TopBlock) {
-    AddSuccessor(LastBlock, CaseBlock);
+    addSuccessor(LastBlock, CaseBlock);
     Succ = TopBlock;
   } else {
     // This block is now the implicit successor of other blocks.
@@ -2317,13 +2317,13 @@
       return 0;
     // Add this block to the list of successors for the block with the try
     // statement.
-    AddSuccessor(NewTryTerminatedBlock, CatchBlock);
+    addSuccessor(NewTryTerminatedBlock, CatchBlock);
   }
   if (!HasCatchAll) {
     if (PrevTryTerminatedBlock)
-      AddSuccessor(NewTryTerminatedBlock, PrevTryTerminatedBlock);
+      addSuccessor(NewTryTerminatedBlock, PrevTryTerminatedBlock);
     else
-      AddSuccessor(NewTryTerminatedBlock, &cfg->getExit());
+      addSuccessor(NewTryTerminatedBlock, &cfg->getExit());
   }
 
   // The code after the try is the implicit successor.
@@ -2458,7 +2458,7 @@
 
   Block = createBlock(false);
   Block->setTerminator(I);
-  AddSuccessor(Block, IBlock);
+  addSuccessor(Block, IBlock);
   return addStmt(I->getTarget());
 }
 
@@ -2543,19 +2543,19 @@
           ConfluenceBlock->pred_end());
 
       // See if this is a known constant.
-      TryResult KnownVal = TryEvaluateBool(E->getLHS());
+      TryResult KnownVal = tryEvaluateBool(E->getLHS());
       if (KnownVal.isKnown() && (E->getOpcode() == BO_LOr))
         KnownVal.negate();
 
       // Link LHSBlock with RHSBlock exactly the same way as for binary operator
       // itself.
       if (E->getOpcode() == BO_LOr) {
-        AddSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
-        AddSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
+        addSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
+        addSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
       } else {
         assert (E->getOpcode() == BO_LAnd);
-        AddSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
-        AddSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
+        addSuccessor(LHSBlock, KnownVal.isFalse() ? NULL : RHSBlock);
+        addSuccessor(LHSBlock, KnownVal.isTrue() ? NULL : ConfluenceBlock);
       }
 
       Block = LHSBlock;
@@ -2634,20 +2634,20 @@
   Block->setTerminator(CFGTerminator(E, true));
 
   // See if this is a known constant.
-  const TryResult &KnownVal = TryEvaluateBool(E->getCond());
+  const TryResult &KnownVal = tryEvaluateBool(E->getCond());
 
   if (LHSBlock) {
-    AddSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
+    addSuccessor(Block, KnownVal.isFalse() ? NULL : LHSBlock);
   } else if (KnownVal.isFalse()) {
-    AddSuccessor(Block, NULL);
+    addSuccessor(Block, NULL);
   } else {
-    AddSuccessor(Block, ConfluenceBlock);
+    addSuccessor(Block, ConfluenceBlock);
     std::reverse(ConfluenceBlock->pred_begin(), ConfluenceBlock->pred_end());
   }
 
   if (!RHSBlock)
     RHSBlock = ConfluenceBlock;
-  AddSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
+  addSuccessor(Block, KnownVal.isTrue() ? NULL : RHSBlock);
 
   return Block;
 }
@@ -2826,13 +2826,13 @@
   typedef llvm::DenseMap<Decl*,std::pair<unsigned,unsigned> > DeclMapTy;
   StmtMapTy StmtMap;
   DeclMapTy DeclMap;
-  signed CurrentBlock;
-  unsigned CurrentStmt;
+  signed currentBlock;
+  unsigned currentStmt;
   const LangOptions &LangOpts;
 public:
 
   StmtPrinterHelper(const CFG* cfg, const LangOptions &LO)
-    : CurrentBlock(0), CurrentStmt(0), LangOpts(LO) {
+    : currentBlock(0), currentStmt(0), LangOpts(LO) {
     for (CFG::const_iterator I = cfg->begin(), E = cfg->end(); I != E; ++I ) {
       unsigned j = 1;
       for (CFGBlock::const_iterator BI = (*I)->begin(), BEnd = (*I)->end() ;
@@ -2872,8 +2872,8 @@
   virtual ~StmtPrinterHelper() {}
 
   const LangOptions &getLangOpts() const { return LangOpts; }
-  void setBlockID(signed i) { CurrentBlock = i; }
-  void setStmtID(unsigned i) { CurrentStmt = i; }
+  void setBlockID(signed i) { currentBlock = i; }
+  void setStmtID(unsigned i) { currentStmt = i; }
 
   virtual bool handledStmt(Stmt* S, llvm::raw_ostream& OS) {
     StmtMapTy::iterator I = StmtMap.find(S);
@@ -2881,8 +2881,8 @@
     if (I == StmtMap.end())
       return false;
 
-    if (CurrentBlock >= 0 && I->second.first == (unsigned) CurrentBlock
-                          && I->second.second == CurrentStmt) {
+    if (currentBlock >= 0 && I->second.first == (unsigned) currentBlock
+                          && I->second.second == currentStmt) {
       return false;
     }
 
@@ -2896,8 +2896,8 @@
     if (I == DeclMap.end())
       return false;
 
-    if (CurrentBlock >= 0 && I->second.first == (unsigned) CurrentBlock
-                          && I->second.second == CurrentStmt) {
+    if (currentBlock >= 0 && I->second.first == (unsigned) currentBlock
+                          && I->second.second == currentStmt) {
       return false;
     }
 

Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=122035&r1=122034&r2=122035&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Thu Dec 16 22:44:39 2010
@@ -285,7 +285,7 @@
              *this),
     SymMgr(StateMgr.getSymbolManager()),
     svalBuilder(StateMgr.getSValBuilder()),
-    EntryNode(NULL), CurrentStmt(NULL),
+    EntryNode(NULL), currentStmt(NULL),
     NSExceptionII(NULL), NSExceptionInstanceRaiseSelectors(NULL),
     RaiseSel(GetNullarySelector("raise", getContext())),
     BR(mgr, *this), TF(tf) {
@@ -530,9 +530,9 @@
 }
 
 void GRExprEngine::ProcessStmt(const CFGStmt S, GRStmtNodeBuilder& builder) {
-  CurrentStmt = S.getStmt();
+  currentStmt = S.getStmt();
   PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
-                                CurrentStmt->getLocStart(),
+                                currentStmt->getLocStart(),
                                 "Error evaluating statement");
 
   Builder = &builder;
@@ -540,7 +540,7 @@
 
   // Create the cleaned state.
   const LocationContext *LC = EntryNode->getLocationContext();
-  SymbolReaper SymReaper(LC, CurrentStmt, SymMgr);
+  SymbolReaper SymReaper(LC, currentStmt, SymMgr);
 
   if (AMgr.shouldPurgeDead()) {
     const GRState *St = EntryNode->getState();
@@ -593,7 +593,7 @@
         Checker *checker = I->second;
         for (ExplodedNodeSet::iterator NI = SrcSet->begin(), NE = SrcSet->end();
              NI != NE; ++NI)
-          checker->GR_evalDeadSymbols(*DstSet, *Builder, *this, CurrentStmt,
+          checker->GR_evalDeadSymbols(*DstSet, *Builder, *this, currentStmt,
                                       *NI, SymReaper, tag);
         SrcSet = DstSet;
       }
@@ -612,7 +612,7 @@
     Builder->SetCleanedState(*I == EntryNode ? CleanedState : GetState(*I));
 
     // Visit the statement.
-    Visit(CurrentStmt, *I, Dst);
+    Visit(currentStmt, *I, Dst);
 
     // Do we need to auto-generate a node?  We only need to do this to generate
     // a node with a "cleaned" state; GRCoreEngine will actually handle
@@ -620,7 +620,7 @@
     if (Dst.size() == 1 && *Dst.begin() == EntryNode
         && !Builder->HasGeneratedNode && !HasAutoGenerated) {
       HasAutoGenerated = true;
-      builder.generateNode(CurrentStmt, GetState(EntryNode), *I);
+      builder.generateNode(currentStmt, GetState(EntryNode), *I);
     }
   }
 
@@ -628,14 +628,14 @@
   CleanedState = NULL;
   EntryNode = NULL;
 
-  CurrentStmt = 0;
+  currentStmt = 0;
 
   Builder = NULL;
 }
 
 void GRExprEngine::ProcessInitializer(const CFGInitializer Init,
                                       GRStmtNodeBuilder &builder) {
-  // We don't set EntryNode and CurrentStmt. And we don't clean up state.
+  // We don't set EntryNode and currentStmt. And we don't clean up state.
   const CXXBaseOrMemberInitializer *BMI = Init.getInitializer();
 
   ExplodedNode *Pred = builder.getBasePredecessor();
@@ -740,7 +740,7 @@
   //  this check when we KNOW that there is no block-level subexpression.
   //  The motivation is that this check requires a hashtable lookup.
 
-  if (S != CurrentStmt && Pred->getLocationContext()->getCFG()->isBlkExpr(S)) {
+  if (S != currentStmt && Pred->getLocationContext()->getCFG()->isBlkExpr(S)) {
     Dst.Add(Pred);
     return;
   }
@@ -1309,7 +1309,7 @@
                                     const Expr* R,
                                     ExplodedNode* Pred, ExplodedNodeSet& Dst) {
 
-  assert(Ex == CurrentStmt &&
+  assert(Ex == currentStmt &&
          Pred->getLocationContext()->getCFG()->isBlkExpr(Ex));
 
   const GRState* state = GetState(Pred);
@@ -1499,7 +1499,7 @@
   assert(B->getOpcode() == BO_LAnd ||
          B->getOpcode() == BO_LOr);
 
-  assert(B==CurrentStmt && Pred->getLocationContext()->getCFG()->isBlkExpr(B));
+  assert(B==currentStmt && Pred->getLocationContext()->getCFG()->isBlkExpr(B));
 
   const GRState* state = GetState(Pred);
   SVal X = state->getSVal(B);





More information about the cfe-commits mailing list