================
@@ -6447,21 +6472,33 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
((D.getContext() != DeclaratorContext::CXXNew)
? AR_GNUAttributesParsed
: AR_GNUAttributesParsedAndRejected);
+ LateParsedAttrList LateAttrs(/*PSoon=*/true,
+ /*LateAttrParseExperimentalExtOnly=*/true);
ParseTypeQualifierListOpt(DS, Reqs, /*AtomicOrPtrauthAllowed=*/true,
- !D.mayOmitIdentifier());
+ !D.mayOmitIdentifier(), {}, &LateAttrs);
D.ExtendWithDeclSpec(DS);
// Recursively parse the declarator.
Actions.runWithSufficientStackSpace(
D.getBeginLoc(), [&] { ParseDeclaratorInternal(D, DirectDeclParser);
});
- if (Kind == tok::star)
+ if (Kind == tok::star) {
+ DeclaratorChunk::LateAttrListTy OpaqueLateAttrList;
+ if (getLangOpts().ExperimentalLateParseAttributes && !LateAttrs.empty())
{
+ if (!D.isFunctionDeclarator()) {
+ for (auto LA : LateAttrs) {
+ OpaqueLateAttrList.push_back(LA);
+ }
----------------
zmodem wrote:
Sounds good to me.
https://github.com/llvm/llvm-project/pull/166491
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits