summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp1
-rw-r--r--clang/lib/Format/Format.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index adbd8a3d1d0..9e6014a6837 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -677,7 +677,6 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State,
if (Current.is(Keywords.kw_function))
State.Stack.back().JSFunctionInlined =
!Newline && Previous && Previous->Type != TT_DictLiteral &&
- Previous->Type != TT_ConditionalExpr &&
// If the unnamed function is the only parameter to another function,
// we can likely inline it and come up with a good format.
(Previous->isNot(tok::l_paren) || Previous->ParameterCount > 1);
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 1eb6d97fc5c..8e4be3e053d 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -416,7 +416,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
GoogleStyle.ColumnLimit = 100;
GoogleStyle.SpaceAfterCStyleCast = true;
} else if (Language == FormatStyle::LK_JavaScript) {
- GoogleStyle.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
+ GoogleStyle.BreakBeforeTernaryOperators = false;
GoogleStyle.MaxEmptyLinesToKeep = 3;
GoogleStyle.SpacesInContainerLiterals = false;
GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
OpenPOWER on IntegriCloud