]> granicus.if.org Git - clang/commit
When instantiating statements that involve conditions (if, while, do,
authorDouglas Gregor <dgregor@apple.com>
Sat, 8 May 2010 22:20:28 +0000 (22:20 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 8 May 2010 22:20:28 +0000 (22:20 +0000)
commiteaa18e449bb09c1e580aa35f9606ff2ca682f4cb
treefd01b5d2ed2b2e2754b3559c9429e709503760c9
parent20fba8ad3fda19bd23d67c069f39080320d46fd5
When instantiating statements that involve conditions (if, while, do,
for, and switch), be careful to construct the full expressions as soon
as we perform template instantation, so we don't either forget to call
temporary destructors or destroy temporaries at the wrong time. This
is the template-instantiation analogue to r103187, during which I
hadn't realized that the issue would affect the handling of these
constructs differently inside and outside of templates.

Fixes a regression in Boost.Function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103357 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/TreeTransform.h
test/CodeGenCXX/condition.cpp
test/SemaTemplate/instantiate-expr-3.cpp