[clang] [clang] Diagnose when spelled 'abi_tag' on namespace doesn't match applied one. (PR #221039)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 12:03:34 PST 2026
================
@@ -6502,6 +6502,9 @@ def err_redefinition_extern_inline : Error<
def warn_attr_abi_tag_namespace : Warning<
"'abi_tag' attribute on %select{non-inline|anonymous}0 namespace ignored">,
InGroup<IgnoredAttributes>;
+def warn_abi_tag_ignored : Warning<
+ "'abi_tag(\"%0\")' is ignored, applying %select{no 'abi_tag'|'abi_tag(\"%2\")'}1">,
----------------
erichkeane wrote:
I would advocate for using something in the `abi_tag(whatever)` conflicts with previous declaration; attribute ignored` or something.
Also, including the double-quotes in here vs having the 'source' do it (since it is a comma delimited list, and the DiagnosenamespaceABITagMismatch now has to do... weird things to have it infix but not outside) is probably the wrong choice.
@AaronBallman : Do you want to join in on the bikeshedding?
https://github.com/llvm/llvm-project/pull/221039
More information about the cfe-commits
mailing list