]> granicus.if.org Git - clang/commitdiff
GRExprEngine::ProcessBranch: Don't register a "pretty-stack printer" when the Conditi...
authorTed Kremenek <kremenek@apple.com>
Wed, 11 Mar 2009 03:54:24 +0000 (03:54 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 11 Mar 2009 03:54:24 +0000 (03:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66636 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index c6457d9be3bd7eef410d266e28944bc67736c2f7..6ff01fc5c9192021a6949f08fd68bf9681d45980 100644 (file)
@@ -543,10 +543,6 @@ const GRState* GRExprEngine::MarkBranch(const GRState* state,
 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 @@ void GRExprEngine::ProcessBranch(Stmt* Condition, Stmt* Term,
     return;
   }
   
+  PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
+                                Condition->getLocStart(),
+                                "Error evaluating branch");
+  
   SVal V = GetSVal(PrevState, Condition);
   
   switch (V.getBaseKind()) {
@@ -2380,11 +2380,10 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
         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);