Before: void f() { MACRO(A * __attribute((foo)) a); }
After: void f() { MACRO(A *__attribute((foo)) a); }
Also check that the __attribute__ alias is handled.
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D86711
if (!NextToken ||
NextToken->isOneOf(tok::arrow, tok::equal, tok::kw_const,
tok::kw_restrict, tok::kw_volatile,
- tok::kw_noexcept) ||
+ tok::kw___attribute, tok::kw_noexcept) ||
(NextToken->is(tok::l_brace) && !NextToken->getNextNonComment()))
return TT_PointerOrReference;
verifyIndependentOfContext("MACRO(A *volatile a);");
verifyIndependentOfContext("MACRO(A *__volatile a);");
verifyIndependentOfContext("MACRO(A *__volatile__ a);");
+ verifyIndependentOfContext("MACRO(A *__attribute__((foo)) a);");
+ verifyIndependentOfContext("MACRO(A *__attribute((foo)) a);");
verifyIndependentOfContext("MACRO('0' <= c && c <= '9');");
verifyFormat("void f() { f(float{1}, a * a); }");
// FIXME: Is there a way to make this work?