summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-07 07:13:20 +0000
committerDaniel Jasper <djasper@google.com>2013-01-07 07:13:20 +0000
commitc7345ccc2c4732603d2803d10b2b235807727057 (patch)
tree66392c6c123dc285aa01102af8ade4d6c818ef5a /clang/lib
parent28c6594c71f5796cc2d1d4591f86bb5316de3aaf (diff)
downloadbcm5719-llvm-c7345ccc2c4732603d2803d10b2b235807727057.tar.gz
bcm5719-llvm-c7345ccc2c4732603d2803d10b2b235807727057.zip
Put a higher penalty on breaking before "." or "->".
This fixes llvm.org/PR14823. Before: local_state->SetString(prefs::kApplicationLocale, parent_local_state ->GetString(prefs::kApplicationLocale)); After: local_state->SetString( prefs::kApplicationLocale, parent_local_state->GetString(prefs::kApplicationLocale)); llvm-svn: 171705
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/Format.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 4d401a5be9e..c6ff8801861 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -99,7 +99,7 @@ public:
Annotations(Annotations), Replaces(Replaces),
StructuralError(StructuralError) {
Parameters.PenaltyIndentLevel = 15;
- Parameters.PenaltyLevelDecrease = 10;
+ Parameters.PenaltyLevelDecrease = 30;
}
/// \brief Formats an \c UnwrappedLine.
@@ -369,7 +369,7 @@ private:
return Level;
if (Right.Tok.is(tok::arrow) || Right.Tok.is(tok::period))
- return 50;
+ return 150;
return 3;
}
OpenPOWER on IntegriCloud