diff options
| author | Daniel Jasper <djasper@google.com> | 2012-12-05 16:24:48 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2012-12-05 16:24:48 +0000 |
| commit | 55b6b6434e0c6772d68578534983f50fd9214909 (patch) | |
| tree | 8c5c0e9119be844fb022ecd24bffcdeabad58386 /clang/lib/Format | |
| parent | 37d6c94e28653f37611d268acca79644c6ecde9d (diff) | |
| download | bcm5719-llvm-55b6b6434e0c6772d68578534983f50fd9214909.tar.gz bcm5719-llvm-55b6b6434e0c6772d68578534983f50fd9214909.zip | |
Remove bad and useless enum to bool conversion.
llvm-svn: 169390
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 030e35e38db..6494c3d3898 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -509,11 +509,8 @@ public: canBreakBetween(Line.Tokens[i - 1], Line.Tokens[i]); if (Line.Tokens[i].Tok.is(tok::colon)) { - if (Line.Tokens[0].Tok.is(tok::kw_case) || i == e - 1) { - Annotation.SpaceRequiredBefore = false; - } else { - Annotation.SpaceRequiredBefore = TokenAnnotation::TT_ConditionalExpr; - } + Annotation.SpaceRequiredBefore = + Line.Tokens[0].Tok.isNot(tok::kw_case) && i != e - 1; } else if (Annotations[i - 1].Type == TokenAnnotation::TT_UnaryOperator) { Annotation.SpaceRequiredBefore = false; } else if (Annotation.Type == TokenAnnotation::TT_UnaryOperator) { |

