[clang] [Clang][Sema] Reject undeduced static data members without initializers (#173349) (PR #174281)

Hamza Hassanain via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 4 12:38:47 PST 2026


================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s
+
+template <class T>
+struct A {
+  template <class U>
+  using E = U;
+
+  static E u; // expected-error {{declaration of variable 'u' with deduced type 'E' requires an initializer}}
+};
+
+decltype(A<int>::u) a;
----------------
HamzaHassanain wrote:

Ok, I added that!

https://github.com/llvm/llvm-project/pull/174281


More information about the cfe-commits mailing list