summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 828e7507626..afd20b22e3a 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -643,7 +643,8 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State,
State.Stack[State.Stack.size() - 2].JSFunctionInlined = false;
}
if (Current.TokenText == "function")
- State.Stack.back().JSFunctionInlined = !Newline;
+ State.Stack.back().JSFunctionInlined =
+ !Newline && Previous && Previous->Type != TT_DictLiteral;
}
moveStatePastFakeLParens(State, Newline);
OpenPOWER on IntegriCloud