[clang] a699ab5 - [clang-format][NFC] Remove redundant Block/Line Comment in is()
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 13 02:14:44 PST 2023
Author: Owen Pan
Date: 2023-11-13T02:14:37-08:00
New Revision: a699ab5adbefc4fa0d63edac8a137b0073576018
URL: https://github.com/llvm/llvm-project/commit/a699ab5adbefc4fa0d63edac8a137b0073576018
DIFF: https://github.com/llvm/llvm-project/commit/a699ab5adbefc4fa0d63edac8a137b0073576018.diff
LOG: [clang-format][NFC] Remove redundant Block/Line Comment in is()
Added:
Modified:
clang/lib/Format/ContinuationIndenter.cpp
Removed:
################################################################################
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 3a829cdedb77fc7..8fffdccd35c059b 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -1428,8 +1428,8 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
return CurrentState.Indent - Current.Tok.getLength() -
Current.SpacesRequiredBefore;
}
- if (Current.isOneOf(tok::comment, TT_BlockComment, TT_LineComment) &&
- NextNonComment->isBinaryOperator() && CurrentState.UnindentOperator) {
+ if (Current.is(tok::comment) && NextNonComment->isBinaryOperator() &&
+ CurrentState.UnindentOperator) {
return CurrentState.Indent - NextNonComment->Tok.getLength() -
NextNonComment->SpacesRequiredBefore;
}
More information about the cfe-commits
mailing list