This revision was automatically updated to reflect the committed changes.
rsmith marked an inline comment as done.
Closed by commit rC338945: Avoid creating conditional cleanup blocks that
contain only @llvm.lifetime.end… (authored by rsmith, committed by ).
Repository:
rC Clang
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
https://reviews.llvm.org/D50286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
rsmith marked an inline comment as done.
rsmith added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:521
+ CGM.getCodeGenOpts().OptimizationLevel > 0 &&
+ !CGM.getCodeGenOpts().SanitizeAddressUseAfterScope) {
+OldConditional = OutermostConditional;
rsmith updated this revision to Diff 159153.
https://reviews.llvm.org/D50286
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/conditional-temporaries.cpp
test/CodeGenCXX/lifetime-asan.cpp
Index: test/CodeGenCXX/lifetime-asan.cpp
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:521
+ CGM.getCodeGenOpts().OptimizationLevel > 0 &&
+ !CGM.getCodeGenOpts().SanitizeAddressUseAfterScope) {
+OldConditional = OutermostConditional;
Why only when
rsmith updated this revision to Diff 159143.
rsmith added a comment.
Add forgotten test file.
https://reviews.llvm.org/D50286
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/conditional-temporaries.cpp
test/CodeGenCXX/lifetime-asan.cpp
Index: test/CodeGenCXX/lifetime-asan.cpp
rsmith created this revision.
rsmith added a reviewer: rjmccall.
When a non-extended temporary object is created in a conditional branch, the
lifetime of that temporary ends outside the conditional (at the end of the
full-expression). If we're inserting lifetime markers, this means we can end