diff options
author | Daniel Jasper <djasper@google.com> | 2016-01-05 13:03:50 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-01-05 13:03:50 +0000 |
commit | 70b119a229f4aad15300d32cefd316ec96c06594 (patch) | |
tree | fba3a58976ac41f24a28abd96c1be5c53ae85f9a /lib/Format/FormatToken.h | |
parent | 9c86c955baf734f34c5a13f600f9a164c5d46353 (diff) | |
download | clang-70b119a229f4aad15300d32cefd316ec96c06594.tar.gz |
clang-format: Improve line wrapping behavior in call sequences.
r256750 has been leading to an undesired behavior:
aaaaaaaaaa
.aaaaaaaaaaaaaaaaaaaaaaaa.aaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
This change increases penalty for wrapping before member accesses that aren't
calls. Thus, this is again formatted as (as it has been before r256750):
aaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaa.aaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/FormatToken.h')
-rw-r--r-- | lib/Format/FormatToken.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Format/FormatToken.h b/lib/Format/FormatToken.h index 78bc0edc45..b683660f35 100644 --- a/lib/Format/FormatToken.h +++ b/lib/Format/FormatToken.h @@ -248,9 +248,9 @@ struct FormatToken { /// with the same precedence, contains the 0-based operator index. unsigned OperatorIndex = 0; - /// \brief Is this the last operator (or "."/"->") in a sequence of operators - /// with the same precedence? - bool LastOperator = false; + /// \brief If this is an operator (or "."/"->") in a sequence of operators + /// with the same precedence, points to the next operator. + FormatToken *NextOperator = nullptr; /// \brief Is this token part of a \c DeclStmt defining multiple variables? /// |