Skip to content

Commit 11895fe

Browse files
committed
add comment
1 parent cd4427b commit 11895fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Parse/ParseTentative.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,9 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
13851385
if (!getLangOpts().ObjC && Next.is(tok::identifier))
13861386
return TPResult::True;
13871387

1388+
// If this identifier was reverted from a token ID, and the next token
1389+
// is a '(', we assume it to be a use of a type trait, so this
1390+
// can never be a type name.
13881391
if (Next.is(tok::l_paren) &&
13891392
Tok.getIdentifierInfo()->hasRevertedTokenIDToIdentifier() &&
13901393
isRevertibleTypeTrait(Tok.getIdentifierInfo())) {

0 commit comments

Comments
 (0)