[all-commits] [llvm/llvm-project] e734f0: [clang] Prevent duplicated instantiation of enumer...
André Brand via All-commits
all-commits at lists.llvm.org
Mon Jan 27 12:42:55 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e734f01bffb87d035d9037ade8d8ba1e96639c2b
https://github.com/llvm/llvm-project/commit/e734f01bffb87d035d9037ade8d8ba1e96639c2b
Author: André Brand <andre.brand at mailbox.org>
Date: 2025-01-27 (Mon, 27 Jan 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
A clang/test/SemaCXX/member-enum-declarations.cpp
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list