diff options
author | André Brand <andre.brand@mailbox.org> | 2025-01-27 21:42:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-27 21:42:33 +0100 |
commit | e734f01bffb87d035d9037ade8d8ba1e96639c2b (patch) | |
tree | 72d47469110613ebb222cb92b3738356ece93e9b /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | bd5d361c059814435bab24189e79e01d94c7039d (diff) | |
download | llvm-e734f01bffb87d035d9037ade8d8ba1e96639c2b.zip llvm-e734f01bffb87d035d9037ade8d8ba1e96639c2b.tar.gz llvm-e734f01bffb87d035d9037ade8d8ba1e96639c2b.tar.bz2 |
[clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (#124407)
This commit addresses a bug occurring when an unscoped member enumeration
of a class template is introduced with an opaque-enum-declaration and later
redeclared with an enum-specifier (per C++23 [class.mem] p6).
Previously, the enumerators, or EnumConstantDecl, of the enum-specifier
were instantiated at both declarations, leading to different issues:
* erroneous ambiguities when referencing the enumerators,
* duplicated diagnostics in the enumerator-list.
The issue is resolved by ensuring that enumerators are instantiated only
at the first instantiated declaration, analogous to nested classes.
Fixes #124405
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions