aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authoryronglin <yronglin777@gmail.com>2024-07-25 19:44:25 +0800
committerGitHub <noreply@github.com>2024-07-25 19:44:25 +0800
commit534e2dd29f252cc13b94312895d2f4b39b54b9d4 (patch)
tree410d44dcb7a38b346766b4668a559bdd3b7d24e0 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent90929dd97a8f2c00148bee676bf8b44bec063d9b (diff)
downloadllvm-534e2dd29f252cc13b94312895d2f4b39b54b9d4.zip
llvm-534e2dd29f252cc13b94312895d2f4b39b54b9d4.tar.gz
llvm-534e2dd29f252cc13b94312895d2f4b39b54b9d4.tar.bz2
[Clang][Interp] Visit `DecompositionDecl` and create a local variable (#100400)
The following code should be well-formed: ```C++ float decompose_complex(_Complex float cf) { static _Complex float scf; auto &[sre, sim] = scf; // ok, this is references initialized by constant expressions all the way down static_assert(&sre == &__real scf); static_assert(&sim == &__imag scf); auto [re, im] = cf; return re*re + im*im; } ``` We should visit `DecompositionDecl` and create a local variable but not a create a dummy value directly. --------- Signed-off-by: yronglin <yronglin777@gmail.com>
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions