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)
commit97a2cdbff3df10f032f99bf3306fd5dd2c5d4cd1
tree93ee0eeb793051c3c84e38707520515535d8eeb9
parentbfb8e189d224c7bc9764d5512f4342c546da31b1
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!

llvm-svn: 302750
clang/lib/CodeGen/CGExprAgg.cpp
clang/test/CodeGenCXX/array-default-argument.cpp [new file with mode: 0644]