]> granicus.if.org Git - clang/commit
When emitting a multidimensional array new, emit the initializers for the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Jun 2014 06:58:52 +0000 (06:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Jun 2014 06:58:52 +0000 (06:58 +0000)
commit95563a5ba8b44747d272f66bad585cd4caf5fbb7
tree31c8b8224b5de4ff8119b3658ef4a16597fe6ecc
parenta52f6237e83863fd602bd74ac627d63425bdea08
When emitting a multidimensional array new, emit the initializers for the
trailing elements as a single loop, rather than sometimes emitting a nest of
several loops. This fixes a bug where CodeGen would sometimes try to emit an
expression with the wrong type for the element being initialized. Plus various
other minor cleanups to the IR produced for array new initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210079 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/cxx11-initializer-array-new.cpp
test/CodeGenCXX/new-array-init.cpp