diff options
author | Daniel Jasper <djasper@google.com> | 2013-07-15 14:33:14 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-07-15 14:33:14 +0000 |
commit | fa21c0724cb96f4893cf90050da5715a49b98754 (patch) | |
tree | d43bebc57bc32fdb48ff2adbf5be237567c8fef6 /clang/lib/Format/Format.cpp | |
parent | a928e1d7a1fac1e947f460966f74fcc93620958d (diff) | |
download | bcm5719-llvm-fa21c0724cb96f4893cf90050da5715a49b98754.tar.gz bcm5719-llvm-fa21c0724cb96f4893cf90050da5715a49b98754.zip |
Improvement of change r186320.
Fixed a test that by now passed for the wrong reason.
Before:
llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
llvm::outs() << "aaaaaaaaaaaaaaaaaaa: "
<< aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
Also reformatted Format.cpp with the latest changes (1 formatting fix
and 1 layout change of a <<-chain).
llvm-svn: 186322
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index f66d95c9109..79048536891 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -127,7 +127,7 @@ namespace format { void setDefaultPenalties(FormatStyle &Style) { Style.PenaltyBreakComment = 45; - Style.PenaltyBreakFirstLessLess = 180; + Style.PenaltyBreakFirstLessLess = 120; Style.PenaltyBreakString = 1000; Style.PenaltyExcessCharacter = 1000000; } @@ -854,7 +854,7 @@ private: // If this ends the array subscript expr, reset the corresponding value. const FormatToken *NextNonComment = Current.getNextNonComment(); if (NextNonComment && NextNonComment->isNot(tok::l_square)) - State.Stack.back().StartOfArraySubscripts = 0; + State.Stack.back().StartOfArraySubscripts = 0; } // Remove scopes created by fake parenthesis. @@ -1339,10 +1339,10 @@ public: : Style(Style), Lex(Lex), SourceMgr(SourceMgr), Whitespaces(SourceMgr, Style), Ranges(Ranges), Encoding(encoding::detectEncoding(Lex.getBuffer())) { - DEBUG(llvm::dbgs() - << "File encoding: " - << (Encoding == encoding::Encoding_UTF8 ? "UTF8" : "unknown") - << "\n"); + DEBUG(llvm::dbgs() << "File encoding: " + << (Encoding == encoding::Encoding_UTF8 ? "UTF8" + : "unknown") + << "\n"); } virtual ~Formatter() {} |