]> granicus.if.org Git - clang/commitdiff
[analyzer] [NFC] very minor ExprEngineC refactoring
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 3 Nov 2017 00:41:29 +0000 (00:41 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 3 Nov 2017 00:41:29 +0000 (00:41 +0000)
Differential Revision: https://reviews.llvm.org/D39577

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/ExprEngineC.cpp

index 6f1e8391e67cf0423b31c15f18cc24946519ece8..6c69542bf094616bf3e47d60d564ab8ee37fe66a 100644 (file)
@@ -92,12 +92,10 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,
       // Process non-assignments except commas or short-circuited
       // logical expressions (LAnd and LOr).
       SVal Result = evalBinOp(state, Op, LeftV, RightV, B->getType());
-      if (Result.isUnknown()) {
-        Bldr.generateNode(B, *it, state);
-        continue;
+      if (!Result.isUnknown()) {
+        state = state->BindExpr(B, LCtx, Result);
       }
 
-      state = state->BindExpr(B, LCtx, Result);
       Bldr.generateNode(B, *it, state);
       continue;
     }