]> granicus.if.org Git - clang/commit
Merging r302817:
authorTom Stellard <tstellar@redhat.com>
Tue, 16 May 2017 13:33:48 +0000 (13:33 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 16 May 2017 13:33:48 +0000 (13:33 +0000)
commitf751db31e6196c0675d629c9cbb8315cf69d4352
treed1465f26d47fe776f2d30fc000677d51103319fa
parentd9ff11a2c98fd83a55ca1c572edd63d56c56c017
Merging r302817:

------------------------------------------------------------------------
r302817 | rsmith | 2017-05-11 14:58:24 -0400 (Thu, 11 May 2017) | 9 lines

PR22877: When constructing an array via a constructor with a default argument
in list-initialization, run cleanups for the default argument after each
iteration of the initialization loop.

We previously only ran the destructor for any temporary once, at the end of the
complete loop, rather than once per iteration!

Re-commit of r302750, reverted in r302776.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@303167 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprAgg.cpp
test/CodeGenCXX/array-default-argument.cpp [new file with mode: 0644]