This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ebb00a22e7e: [clang-format][NFC] Simplify if in
ContinuationIndenter::addTokenOCL (authored by HazardyKnusperkeks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120237/new/
https://reviews.llvm.org/D120237
Files:
clang/lib/Format/ContinuationIndenter.cpp
Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -784,14 +784,12 @@
// OuterFunction(InnerFunctionCall( // break
// ParameterToInnerFunction)) // break
// .SecondInnerFunctionCall();
- bool HasTrailingCall = false;
if (Previous.MatchingParen) {
const FormatToken *Next = Previous.MatchingParen->getNextNonComment();
- HasTrailingCall = Next && Next->isMemberAccess();
+ if (Next && Next->isMemberAccess() && State.Stack.size() > 1 &&
+ State.Stack[State.Stack.size() - 2].CallContinuation == 0)
+ CurrentState.LastSpace = State.Column;
}
- if (HasTrailingCall && State.Stack.size() > 1 &&
- State.Stack[State.Stack.size() - 2].CallContinuation == 0)
- CurrentState.LastSpace = State.Column;
}
}
Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -784,14 +784,12 @@
// OuterFunction(InnerFunctionCall( // break
// ParameterToInnerFunction)) // break
// .SecondInnerFunctionCall();
- bool HasTrailingCall = false;
if (Previous.MatchingParen) {
const FormatToken *Next = Previous.MatchingParen->getNextNonComment();
- HasTrailingCall = Next && Next->isMemberAccess();
+ if (Next && Next->isMemberAccess() && State.Stack.size() > 1 &&
+ State.Stack[State.Stack.size() - 2].CallContinuation == 0)
+ CurrentState.LastSpace = State.Column;
}
- if (HasTrailingCall && State.Stack.size() > 1 &&
- State.Stack[State.Stack.size() - 2].CallContinuation == 0)
- CurrentState.LastSpace = State.Column;
}
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits