[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 19 07:31:53 PDT 2024
================
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 %s -verify
+
+#if !__has_cpp_attribute(clang::diagnose_specializations)
+# error
+#endif
+
+struct [[clang::diagnose_specializations]] S {}; // expected-warning {{'diagnose_specializations' attribute only applies to class templates}}
----------------
AaronBallman wrote:
doesn't it also apply to variable templates?
https://github.com/llvm/llvm-project/pull/101469
More information about the cfe-commits
mailing list