summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-12-05 16:24:48 +0000
committerDaniel Jasper <djasper@google.com>2012-12-05 16:24:48 +0000
commit55b6b6434e0c6772d68578534983f50fd9214909 (patch)
tree8c5c0e9119be844fb022ecd24bffcdeabad58386 /clang/lib/Format
parent37d6c94e28653f37611d268acca79644c6ecde9d (diff)
downloadbcm5719-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.cpp7
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) {
OpenPOWER on IntegriCloud