summaryrefslogtreecommitdiffstats
path: root/clang/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
commit687af3bb537f493a684138802c59fce178c6de16 (patch)
tree7b4507b5383e28018d2edf156f0c7eec1b67a687 /clang/lib/Format/Format.cpp
parent6cfb1537b62470b424fae8a9b64ddfa85092359a (diff)
downloadbcm5719-llvm-687af3bb537f493a684138802c59fce178c6de16.tar.gz
bcm5719-llvm-687af3bb537f493a684138802c59fce178c6de16.zip
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. llvm-svn: 175162
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index c50bfb0a702..92c138aa7ef 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud