[PATCH] D20498: [Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu May 26 13:36:34 PDT 2016
rsmith added inline comments.
================
Comment at: lib/Sema/SemaInit.cpp:6197
@@ +6196,3 @@
+ // but there may be a chance to merge them.
+ if (getLangOpts().CPlusPlus)
+ Cleanup.setExprNeedsCleanups(false);
----------------
Why is this C++-only? We presumably would want to clean up after materialized temporaries in other languages if they ever get created.
================
Comment at: lib/Sema/SemaInit.cpp:6461
@@ -6460,3 +6477,2 @@
- // If we're binding to an Objective-C object that has lifetime, we
// need cleanups. Likewise if we're extending this temporary to automatic
----------------
Accidentally-deleted?
http://reviews.llvm.org/D20498
More information about the cfe-commits
mailing list