diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-05 22:41:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-05 22:41:02 +0000 |
commit | 0511d23aeb00062a1b61f4da4734eff322a79779 (patch) | |
tree | d45e6605a6b23acf285780f7305974d5a536012d /llvm/test/tools/llvm-opt-report/basic.test | |
parent | 061a0bf8fddb0f04f0edc21aef8bc1085dfdc2bd (diff) | |
download | bcm5719-llvm-0511d23aeb00062a1b61f4da4734eff322a79779.tar.gz bcm5719-llvm-0511d23aeb00062a1b61f4da4734eff322a79779.zip |
PR22924, PR22845, some of CWG1464: When checking the initializer for an array
new expression, distinguish between the case of a constant and non-constant
initializer. In the former case, if the bound is erroneous (too many
initializer elements, bound is negative, or allocated size overflows), reject,
and take the bound into account when determining whether we need to
default-construct any elements. In the remanining cases, move the logic to
check for default-constructibility of trailing elements into the initialization
code rather than inventing a bogus array bound, to cope with cases where the
number of initialized elements is not the same as the number of initializer
list elements (this can happen due to string literal initialization or brace
elision).
This also fixes rejects-valid and crash-on-valid errors when initializing a
new'd array of character type from a braced string literal.
llvm-svn: 283406
Diffstat (limited to 'llvm/test/tools/llvm-opt-report/basic.test')
0 files changed, 0 insertions, 0 deletions