[PATCH] D39577: [analyzer] [NFC] very minor ExprEngineC refactoring

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 15:52:27 PDT 2017


george.karpenkov created this revision.
Herald added subscribers: szepet, xazax.hun.

https://reviews.llvm.org/D39577

Files:
  lib/StaticAnalyzer/Core/ExprEngineC.cpp


Index: lib/StaticAnalyzer/Core/ExprEngineC.cpp
===================================================================
--- lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -92,12 +92,10 @@
       // 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;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39577.121401.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171102/b3874865/attachment-0001.bin>


More information about the cfe-commits mailing list