================
@@ -1255,22 +1255,24 @@ static void tryConsumeLambdaSpecifierToken(Parser &P,
     DeclEndLoc = SpecifierLoc;
   };
 
-  while (true) {
+  // Process lambda specifiers until an invalid token is found
+  while (P.getCurToken().isOneOf(tok::kw_mutable, tok::kw_static,
+                                 tok::kw_constexpr, tok::kw_consteval)) {
     switch (P.getCurToken().getKind()) {
     case tok::kw_mutable:
-      ConsumeLocation(MutableLoc, 0);
+      ConsumeLocation(MutableLoc, 0); 
       break;
     case tok::kw_static:
-      ConsumeLocation(StaticLoc, 1);
+      ConsumeLocation(StaticLoc, 1); 
       break;
     case tok::kw_constexpr:
-      ConsumeLocation(ConstexprLoc, 2);
+      ConsumeLocation(ConstexprLoc, 2); 
----------------
cor3ntin wrote:

can you remove the trailing whitespaces?

https://github.com/llvm/llvm-project/pull/117953
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to