diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2022-06-06 07:17:35 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2022-06-06 07:17:35 -0400 |
commit | 881125ad9178120acef186f579e36ced0888dfdb (patch) | |
tree | 1a9b07e2437733a30739705a291bdaf6a6c41efa /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 4ea1b43527c9a845942dbbc27e022d74d72728e6 (diff) | |
download | llvm-881125ad9178120acef186f579e36ced0888dfdb.zip llvm-881125ad9178120acef186f579e36ced0888dfdb.tar.gz llvm-881125ad9178120acef186f579e36ced0888dfdb.tar.bz2 |
Allow use of an elaborated type specifier in a _Generic association in C++
Currently, Clang accepts this code in C mode (where the tag is required
to be used) but rejects it in C++ mode thinking that the association is
defining a new type.
void foo(void) {
struct S { int a; };
_Generic(something, struct S : 1);
}
Clang thinks this in C++ because it sees struct S : when parsing the
class specifier and decides that must be a type definition (because the
colon signifies the presence of a base class type). This patch adds a
new declarator context to represent a _Generic association so that we
can distinguish these situations properly.
Fixes #55562
Differential Revision: https://reviews.llvm.org/D126969
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions