[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 10:34:49 PDT 2024


================
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule<AttrSubject subject> {
 
 def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule<Named>;
 
+// Late Attribute parsing mode enum
+class LateAttrParseKind <int val> {
+  int Kind = val;
+}
+
+// Never late parsed
+def LateAttrParseNever : LateAttrParseKind<0>;
+
+// Standard late attribute parsing
+//
+// This is language dependent. For example:
+//
+// * For C++ enables late parsing of a declaration attributes
+// * For C does not enable late parsing of attributes
+//
+def LateAttrParseStandard: LateAttrParseKind<1>;
----------------
AaronBallman wrote:

```suggestion
def LateAttrParseStandard : LateAttrParseKind<1>;
```

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


More information about the cfe-commits mailing list