]> granicus.if.org Git - clang/commit
PR22877: When constructing an array via a constructor with a default argument
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 11 May 2017 00:17:17 +0000 (00:17 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 11 May 2017 00:17:17 +0000 (00:17 +0000)
commit1ac0f201387d84ebcf90968a7276c120c0fe7688
tree9ff3e9d020ed7d6b578a27560ddfb0d8c36bf477
parent37d86beee71c869307c406d9300c0dabb810a9f8
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!

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