diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2020-12-03 10:01:53 -0500 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2020-12-04 10:03:23 -0500 |
commit | 090dd647d98dc50a56a42fbba0f3f11b10a3a187 (patch) | |
tree | 039abc03675d9ee0c23b7915500ecf829557b74b /llvm/lib/Support/JSON.cpp | |
parent | c8ec685ca555459051125f9c0194ceee19e959d7 (diff) | |
download | llvm-090dd647d98dc50a56a42fbba0f3f11b10a3a187.zip llvm-090dd647d98dc50a56a42fbba0f3f11b10a3a187.tar.gz llvm-090dd647d98dc50a56a42fbba0f3f11b10a3a187.tar.bz2 |
[Sema] Fold VLAs to constant arrays in a few more contexts
552c6c2 removed support for promoting VLAs to constant arrays when the bounds
isn't an ICE, since this can result in miscompiling a conforming program that
assumes that the array is a VLA. Promoting VLAs for fields is still supported,
since clang doesn't support VLAs in fields, so no conforming program could have
a field VLA.
This change is really disruptive, so this commit carves out two more cases
where we promote VLAs which can't miscompile a conforming program:
- When the VLA appears in an ivar -- this seems like a corollary to the field thing
- When the VLA has an initializer -- VLAs can't have an initializer
Differential revision: https://reviews.llvm.org/D90871
Diffstat (limited to 'llvm/lib/Support/JSON.cpp')
0 files changed, 0 insertions, 0 deletions