[PATCH] [analyzer] Enable limited support for temporary destructors

Jordan Rose jordan_rose at apple.com
Fri Aug 30 17:24:44 PDT 2013


  All right, looking good. Feel free to commit after fixing the last cosmetic issues.


================
Comment at: lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp:813-814
@@ +812,4 @@
+  // FIXME: Remove this once temp destructors are working.
+  if ((*currBldrCtx->getBlock())[currStmtIdx].getAs<CFGTemporaryDtor>())
+    return false;
+
----------------
All I meant for this was add `if (isa<CXXDestructorDecl>(Call))` around the current check. Do you think that would be an improvement?

================
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1362
@@ +1361,3 @@
+  // If the value is already available, we don't need to do anything.
+  if(Pred->getState()->getSVal(Condition, Pred->getLocationContext()).isUnknownOrUndef()) {
+    // Resolve the condition in the presence of nested '||' and '&&'.
----------------
Please split this up into multiple lines, then. An `LCtx` local would go a long way. (Also, missing space after `if`.)


http://llvm-reviews.chandlerc.com/D1259



More information about the cfe-commits mailing list