================
@@ -0,0 +1,34 @@
+// 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}}
+
+template <class T, class U>
+struct [[clang::diagnose_specializations]] is_same {
----------------
philnik777 wrote:

I guess we could add an optional string, but I'd actually keep the error 
message generic in libc++. IMO adding the stable name is more useful for us 
than for users. Maybe a bit stronger wording like `'X' cannot be specialized` 
would make sense.

https://github.com/llvm/llvm-project/pull/101469
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to