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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 2 06:20:22 PST 2025


================
@@ -12,5 +12,5 @@
 [[using clang:]] extern int n; // ok
 [[using blah: clang::optnone]] extern int n; // expected-error {{attribute with scope specifier cannot follow}} expected-warning {{only applies to functions}}
 
-[[using clang: unknown_attr]] extern int n; // expected-warning {{unknown attribute}}
----------------
erichkeane wrote:

This shows the exact problem here that I have above.  We KNOW 'clang' (in fact, we OWN it).  We should diagnose this as an unknown attribute, not as an unknown namespace.

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


More information about the cfe-commits mailing list