HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: owenpan, MyDeveloperDay, curdeius. HazardyKnusperkeks added a project: clang-format. HazardyKnusperkeks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
And then use the argument and member. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D116558 Files: clang/lib/Format/TokenAnnotator.cpp Index: clang/lib/Format/TokenAnnotator.cpp =================================================================== --- clang/lib/Format/TokenAnnotator.cpp +++ clang/lib/Format/TokenAnnotator.cpp @@ -75,7 +75,7 @@ : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), Keywords(Keywords) { Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false)); - resetTokenMetadata(CurrentToken); + resetTokenMetadata(); } private: @@ -1409,8 +1409,8 @@ Tok.Next->Next->Next && Tok.Next->Next->Next->is(tok::l_paren); } - void resetTokenMetadata(FormatToken *Token) { - if (!Token) + void resetTokenMetadata() { + if (!CurrentToken) return; // Reset token type in case we have already looked at it and then @@ -1439,7 +1439,7 @@ CurrentToken = CurrentToken->Next; } - resetTokenMetadata(CurrentToken); + resetTokenMetadata(); } /// A struct to hold information valid in a specific context, e.g.
Index: clang/lib/Format/TokenAnnotator.cpp =================================================================== --- clang/lib/Format/TokenAnnotator.cpp +++ clang/lib/Format/TokenAnnotator.cpp @@ -75,7 +75,7 @@ : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), Keywords(Keywords) { Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false)); - resetTokenMetadata(CurrentToken); + resetTokenMetadata(); } private: @@ -1409,8 +1409,8 @@ Tok.Next->Next->Next && Tok.Next->Next->Next->is(tok::l_paren); } - void resetTokenMetadata(FormatToken *Token) { - if (!Token) + void resetTokenMetadata() { + if (!CurrentToken) return; // Reset token type in case we have already looked at it and then @@ -1439,7 +1439,7 @@ CurrentToken = CurrentToken->Next; } - resetTokenMetadata(CurrentToken); + resetTokenMetadata(); } /// A struct to hold information valid in a specific context, e.g.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits