[PATCH] D115070: [clang-format][NFC] Early return when nothing to do
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 4 12:30:44 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4041f16bb489: [clang-format][NFC] Early return when nothing to do (authored by HazardyKnusperkeks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115070/new/
https://reviews.llvm.org/D115070
Files:
clang/lib/Format/ContinuationIndenter.cpp
Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -1337,6 +1337,9 @@
void ContinuationIndenter::moveStatePastFakeLParens(LineState &State,
bool Newline) {
const FormatToken &Current = *State.NextToken;
+ if (Current.FakeLParens.empty())
+ return;
+
const FormatToken *Previous = Current.getPreviousNonComment();
// Don't add extra indentation for the first fake parenthesis after
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115070.391864.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211204/db3b6f02/attachment.bin>
More information about the cfe-commits
mailing list