[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 06:21:25 PDT 2023


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

1 suggestion to catch a few more cases that I think are incorrect, but this is a move in the right direction.  Thanks!



================
Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:55
+
+    /// The attibute has no source code manifestation and is only created
+    /// implicitly.
----------------
If I recall, there was some pretty awful funny business in some attributes, which would explicitly use '0' instead of AS_GNU as implicit.  Did you run into any of these?

Would it make sense to make AS_Implicit 'first' here to catch those?  Or perhaps make '0' ill-formed (and assert?) and make this '1'?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148101



More information about the cfe-commits mailing list