================
@@ -5629,6 +5632,8 @@ bool Parser::isTypeSpecifierQualifier(const Token &Tok) {
     return isTypeSpecifierQualifier(getCurToken());
 
   case tok::coloncolon:   // ::foo::bar
+    if (!getLangOpts().CPlusPlus && !getLangOpts().ObjC)
----------------
AaronBallman wrote:

So why the `&& !ObjC` check? If ObC is true, we go on to check for `::new`, etc 
and won't that hit the same infinite loop when we check for type specifiers 
after annotation tokens?

Shouldn't we look to see whether `TryAnnotateTypeOrScopeToken()` created an 
annotation token before recursing instead of looking at language modes?

https://github.com/llvm/llvm-project/pull/195377
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to