================
@@ -4093,7 +4093,26 @@ void Parser::ParseDeclarationSpecifiers(
       break;
     case tok::kw_auto:
       if (getLangOpts().CPlusPlus11 || getLangOpts().C23) {
-        if (isKnownToBeTypeSpecifier(GetLookAheadToken(1))) {
+        auto MayBeTypeSpecifier = [&]() {
+          if (getLangOpts().C23 && DS.hasTypeSpecifier() &&
+              DS.getTypeSpecType() != DeclSpec::TST_auto &&
+              DS.getConstexprSpecifier() == ConstexprSpecKind::Unspecified)
+            return true;
+
+          unsigned I = 1;
+          while (true) {
----------------
a-tarasyuk wrote:

@AaronBallman I think this should apply only in C23 mode, so I’ve added that 
restriction., thanks

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

Reply via email to