[clang] [Clang] Fix parsing of reversible type traits in template arguments (PR #95969)
Mital Ashok via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 18 14:20:01 PDT 2024
================
@@ -1385,6 +1385,12 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
if (!getLangOpts().ObjC && Next.is(tok::identifier))
return TPResult::True;
+ if (Next.is(tok::l_paren) &&
+ Tok.getIdentifierInfo()->hasRevertedTokenIDToIdentifier() &&
+ isRevertibleTypeTrait(Tok.getIdentifierInfo())) {
----------------
MitalAshok wrote:
You can set the correct `tok::TokenKind` here too since it will be set later anyway when this is re-parsed as an expression
https://github.com/llvm/llvm-project/pull/95969
More information about the cfe-commits
mailing list