================ @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s +// expected-no-diagnostics + +enum {A, S, D, F}; +int main() { + using asdf = decltype(A); + using enum asdf; // this line causes the crash + return 0; +} ---------------- AaronBallman wrote:
I'd like to see an additional test case demonstrating that we correctly added the enumerators to the correct scope: ``` enum {A, S, D, F}; constexpr struct T { using asdf = decltype(A); using enum asdf; } t; static_assert(t.D == D); static_assert(T::S == S); ``` and ``` enum {A, S, D, F}; constexpr struct T { struct { using asdf = decltype(A); using enum asdf; } inner; } t; static_assert(t.inner.D == D); static_assert(t.D == D); // expected-error ``` https://github.com/llvm/llvm-project/pull/87144 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits