[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 6 22:50:30 PDT 2025
================
@@ -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
More information about the cfe-commits
mailing list