[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed May 28 06:47:18 PDT 2025


================
@@ -1842,8 +1842,7 @@ void Parser::ProhibitCXX11Attributes(ParsedAttributes &Attrs,
       continue;
     if (AL.getKind() == ParsedAttr::UnknownAttribute) {
       if (WarnOnUnknownAttrs)
-        Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored)
-            << AL << AL.getRange();
+        Actions.DiagnoseUnknownAttribute(AL);
----------------
erichkeane wrote:

Curious that this is not setting it to invalid, but the branch below is.  Is that a mistake?

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


More information about the cfe-commits mailing list