[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 3 08:27:32 PST 2025


================
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
 
 def warn_unknown_attribute_ignored : Warning<
   "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
+def ext_unknown_attribute_ignored : Extension<
+  "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
----------------
erichkeane wrote:

I see that, though disagree somewhat.  I see value in it being a separate GROUP, but it should still be a warning.  The intent of attributes THEMSELVES is to be ignorable without #ifdef-hell, so the criticisms against the prefix is the same here.

Though note: the intent of the prefixes was NOT actually to avoid #ifdef-hell (at least in C++, though it might have been used as side-justification in WG14).  The point was to ensure that the 'global' namespace was reserved for the standard attributes, and provide an extension point for implementers.

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


More information about the cfe-commits mailing list