[PATCH] D82999: [CodeGen] Check the cleanup flag before destructing temporaries created in conditional expressions

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 1 15:09:18 PDT 2020


ahatanak created this revision.
ahatanak added reviewers: rsmith, rjmccall.
ahatanak added a project: clang.
Herald added subscribers: ributzka, dexonsmith, jkorous.

The temporary of the true operand shouldn't be destructed when the false operand is evaluated and throws.

rdar://problem/64829372


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82999

Files:
  clang/lib/CodeGen/CGDecl.cpp
  clang/test/CodeGenCXX/exceptions.cpp
  clang/test/CodeGenCXX/temporaries.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82999.274920.patch
Type: text/x-patch
Size: 4401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200701/ff2a4e24/attachment-0001.bin>


More information about the cfe-commits mailing list