clang-format: Support case ranges.
Before (note the missing space before "..." which can lead to compile
errors):
switch (x) {
case 'A'... 'Z':
case 1... 5:
break;
}
After:
switch (x) {
case 'A' ... 'Z':
case 1 ... 5:
break;
}
llvm-svn: 193050
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 9bc1097..7e794a3 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1237,7 +1237,7 @@
if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less))
return false;
if (Right.is(tok::ellipsis))
- return false;
+ return Left.Tok.isLiteral();
if (Left.is(tok::l_square) && Right.is(tok::amp))
return false;
if (Right.Type == TT_PointerOrReference)