aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-14 14:26:07 +0000
committerDaniel Jasper <djasper@google.com>2013-02-14 14:26:07 +0000
commitfc75908a7f58903a92c47e1ae02f9a05c36c9f59 (patch)
treed67702c82082f18588d408954c76f20b186238cc /lib/Format/Format.cpp
parent68a932d416c52cef609e2c6c79ae99cbf4b9acd6 (diff)
Reduce penalty for breaking before ./-> after complex calls.
This gives a clearer separation of the context, e.g. in GMOCK statements. Before: EXPECT_CALL(SomeObject, SomeFunction(Parameter)).WillRepeatedly(Return(SomeValue)); After: EXPECT_CALL(SomeObject, SomeFunction(Parameter)) .WillRepeatedly(Return(SomeValue)); Minor format cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index c50bfb0a70..92c138aa7e 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -675,7 +675,7 @@ private:
std::set<LineState> Seen;
// Insert start element into queue.
- StateNode *Node=
+ StateNode *Node =
new (Allocator.Allocate()) StateNode(InitialState, false, NULL);
Queue.push(QueueItem(OrderedPenalty(0, Count), Node));
++Count;
@@ -683,7 +683,7 @@ private:
// While not empty, take first element and follow edges.
while (!Queue.empty()) {
unsigned Penalty = Queue.top().first.first;
- StateNode *Node= Queue.top().second;
+ StateNode *Node = Queue.top().second;
if (Node->State.NextToken == NULL) {
DEBUG(llvm::errs() << "\n---\nPenalty for line: " << Penalty << "\n");
break;
@@ -1024,8 +1024,7 @@ private:
/// \p IndentForLevel must contain the indent for the level \c l
/// at \p IndentForLevel[l], or a value < 0 if the indent for
/// that level is unknown.
- unsigned getIndent(const std::vector<int> IndentForLevel,
- unsigned Level) {
+ unsigned getIndent(const std::vector<int> IndentForLevel, unsigned Level) {
if (IndentForLevel[Level] != -1)
return IndentForLevel[Level];
if (Level == 0)