Before:
template <typename... Types>
typename enable_if < 0<sizeof...(Types)>::type Foo() {}
After:
template <typename... Types>
typename enable_if<0 < sizeof...(Types)>::type Foo() {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187458
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
break;
case tok::less:
- if (parseAngle())
+ if (Tok->Previous && !Tok->Previous->Tok.isLiteral() && parseAngle())
Tok->Type = TT_TemplateOpener;
else {
Tok->Type = TT_BinaryOperator;
" while (a < b && c > d) {\n"
" }\n"
"}");
+ verifyFormat("template <typename... Types>\n"
+ "typename enable_if<0 < sizeof...(Types)>::type Foo() {}");
}
TEST_F(FormatTest, UnderstandsBinaryOperators) {
" : Implementation(new ImplicitCastMatcher<F>(Other)) {}");
// FIXME: This is still incorrectly handled at the formatter side.
- verifyFormat("template <> struct X < 15, i < 3 && 42 < 50 && 33<28> {};");
+ verifyFormat("template <> struct X < 15, i<3 && 42 < 50 && 33 < 28> {};");
// FIXME:
// This now gets parsed incorrectly as class definition.