================ @@ -592,6 +592,46 @@ 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>; + +// Experimental extension to standard late attribute parsing +// +// This extension behaves like `LateAttrParseStandard` but allows +// late parsing attributes in more contexts. +// +// This extension changes behavior depending on whether the +// `-fexperimental-late-parse-attributes` +// (`LangOpts.ExperimentalLateParseAttributes`) flag is enabled. +// +// * If the flag is disabled then the attribute is parsed just like +// `LateAttrParseStandard`. +// +// * If the flag is enabled and if the attribute is being used in a context +// supported by this extension it will be late parsed. Otherwise the attribute +// will be parsed just like `LateAttrParseStandard`. +// +// Currently this extension extends `LateAttrParseStandard` by allowing: +// +// * For C, late parsing of the `counted_by` as a type or decl attribute. +// (TODO: Not implemented yet). ---------------- rapidsna wrote:
I don't have a strong opinion here. Having TODO in the comment seems okay to me. https://github.com/llvm/llvm-project/pull/88596 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits