[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 18:00:42 PST 2022


arphaman added inline comments.


================
Comment at: clang/lib/Parse/ParseObjc.cpp:69
+      if (PA.isGNUAttribute())
+        Diag(PA.getLoc(), diag::err_objc_unexpected_attr);
+  }
----------------
I think it might be better to still report this error at the location of the `@` token (`Tok.getLocation()`). This will let us report the error at the actual Objective-C keyword which the user should note should not be used with the attribute. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137979/new/

https://reviews.llvm.org/D137979



More information about the cfe-commits mailing list