[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:23:59 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) &&
----------------
MitalAshok wrote:

We might need a comment above this like:

```c++
// If this identifier was reverted from a token ID, and the next token
// is a '(', this is likely to be a use of a type trait. If it is, this
// can never be a type name.
```

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


More information about the cfe-commits mailing list