[cfe-commits] r66636 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Tue Mar 10 20:54:25 PDT 2009


Author: kremenek
Date: Tue Mar 10 22:54:24 2009
New Revision: 66636

URL: http://llvm.org/viewvc/llvm-project?rev=66636&view=rev
Log:
GRExprEngine::ProcessBranch: Don't register a "pretty-stack printer" when the Condition is null.

Modified:
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=66636&r1=66635&r2=66636&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Tue Mar 10 22:54:24 2009
@@ -543,10 +543,6 @@
 void GRExprEngine::ProcessBranch(Stmt* Condition, Stmt* Term,
                                  BranchNodeBuilder& builder) {
   
-  PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
-                                Condition->getLocStart(),
-                                "Error evaluating branch");
-
   // Remove old bindings for subexpressions.
   const GRState* PrevState =
     StateMgr.RemoveSubExprBindings(builder.getState());
@@ -557,6 +553,10 @@
     return;
   }
   
+  PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
+                                Condition->getLocStart(),
+                                "Error evaluating branch");
+  
   SVal V = GetSVal(PrevState, Condition);
   
   switch (V.getBaseKind()) {
@@ -2380,11 +2380,10 @@
         continue;
       }
       
-      // Handle all other values.
-      
+      // Handle all other values.      
       BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
                                                      : BinaryOperator::Sub;
-      
+
       SVal Result = EvalBinOp(Op, V2, MakeConstantVal(1U, U));      
       state = BindExpr(state, U, U->isPostfix() ? V2 : Result);
 





More information about the cfe-commits mailing list