summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index f642a703091..77815b0406b 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1042,7 +1042,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
if (Tok.Type == TT_OverloadedOperatorLParen)
return false;
if (Tok.is(tok::colon))
- return Line.First.isNot(tok::kw_case) && !Tok.Children.empty() &&
+ return Line.First.isNot(tok::kw_case) &&
+ Line.First.isNot(tok::kw_default) && !Tok.Children.empty() &&
Tok.Type != TT_ObjCMethodExpr;
if (Tok.is(tok::l_paren) && !Tok.Children.empty() &&
Tok.Children[0].Type == TT_PointerOrReference &&
OpenPOWER on IntegriCloud