Skip to content

Commit

Permalink
refactor: add missing Cpp2 to member names
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Sep 25, 2024
1 parent b4deab2 commit a7cb3c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions clang/lib/Format/UnwrappedLineParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3129,24 +3129,24 @@ void UnwrappedLineParser::parseCpp2ParameterDeclaration() {
parseCpp2Identifier();
}

bool UnwrappedLineParser::skipBalancedTokens(CurrentToken &Tok) {
bool UnwrappedLineParser::skipCpp2BalancedTokens(CurrentToken &Tok) {
if (!isCpp2OpeningPunctuator(Tok, tok::unknown))
return false;
const auto Closer = getCpp2ClosingPunctuator(Tok);
do {
Tok = getNextNonComment(Tokens);
if (isCpp2OpeningPunctuator(Tok, tok::unknown))
skipBalancedTokens(Tok);
skipCpp2BalancedTokens(Tok);
} while (!Tok->isOneOf(Closer, tok::eof));
if (Tok->is(Closer))
Tok = getNextNonComment(Tokens);
return true;
}

auto UnwrappedLineParser::skipDeclarationSignature(
auto UnwrappedLineParser::skipCpp2DeclarationSignature(
CurrentToken Tok, const tok::TokenKind Closer) -> CurrentToken {
while (!Tok->isOneOf(Closer, tok::eof, tok::comma)) {
if (skipBalancedTokens(Tok))
if (skipCpp2BalancedTokens(Tok))
continue;
Tok = getNextNonComment(Tokens);
}
Expand Down Expand Up @@ -3212,7 +3212,7 @@ auto UnwrappedLineParser::atCpp2ParameterDeclarationSeq(
if (startsCpp2Identifier(Res.Tok) && Opener == tok::less)
continue;

Tok = skipDeclarationSignature(Tok, Closer);
Tok = skipCpp2DeclarationSignature(Tok, Closer);
}

if (Tok->is(Closer)) {
Expand Down
5 changes: 3 additions & 2 deletions clang/lib/Format/UnwrappedLineParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,9 @@ class UnwrappedLineParser {
void parseCpp2ThisSpecifier();
auto atCpp2ParameterDeclarationHead(CurrentToken);
void parseCpp2ParameterDeclaration();
bool skipBalancedTokens(CurrentToken &);
CurrentToken skipDeclarationSignature(CurrentToken, tok::TokenKind Closer);
bool skipCpp2BalancedTokens(CurrentToken &);
CurrentToken skipCpp2DeclarationSignature(CurrentToken,
tok::TokenKind Closer);
Cpp2ListOf atCpp2ParameterDeclarationSeq(CurrentToken, tok::TokenKind Opener);
void parseCpp2ParameterDeclarationSeq(Cpp2Punctuator Opener);
Cpp2ListOf atCpp2TemplateParameterDeclarationList(CurrentToken);
Expand Down

0 comments on commit a7cb3c3

Please sign in to comment.