[PATCH] D13973: CFG: Delay creating Dtors for CompoundStmts which end in ReturnStmt
Manuel Klimek via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 23 02:31:16 PDT 2015
klimek added inline comments.
================
Comment at: lib/Analysis/CFG.cpp:1949-1952
@@ +1948,6 @@
+ }
+ if(!C->body_empty() && !dyn_cast<ReturnStmt>(*C->body_rbegin())) {
+ // If the body ends with a ReturnStmt, the dtors will be added in VisitReturnStmt
+ addAutomaticObjDtors(ScopePos, scopeBeginPos, C);
+ }
+
----------------
If the body is non-empty, but the return is not the last statement, won't that still call addAutomaticObjDtors twice?
http://reviews.llvm.org/D13973
More information about the cfe-commits
mailing list