[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 13 22:52:15 PDT 2024


delcypher wrote:

@Sirraide 

Thanks for the feedback.

> This should also add some tests that actually use experimentally late-parsed attributes w/ the flag explicilty enabled/disabled.

The intention is for the functionality being added to be used in a subsequent PR. This is currently sketched in this work-in-progress PR (#87596). This patch is separate from #87596 because it makes reviewing easier.

I do not know how I would write tests for declaring an attribute as experimentally late parsed without that. AFAIK I'd have to use `LateAttrParsingExperimentalOnly` in `Attr.td`  but

* It seems undesirable to change any of the existing attributes just for the purposes of testing.
* Adding a fake attribute for testing would likely impact Clang itself (i.e. the fake attribute would show up as something clang would parse) which doesn't seem desirable at all.

Given that a subsequent patch will add the necessary test coverage and the above problems I think it is reasonable for explicit tests for `LateAttrParsingExperimentalOnly`  to be omitted . 



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


More information about the cfe-commits mailing list