clang-format: Improve operator and template recognition.
Before:
static_assert(is_convertible < A &&, B > ::value, "AAA");
After:
static_assert(is_convertible<A &&, B>::value, "AAA");
llvm-svn: 214075
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 28bdf32..c942ae9 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4578,6 +4578,7 @@
verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaa);",
getLLVMStyleWithColumns(60));
+ verifyFormat("static_assert(is_convertible<A &&, B>::value, \"AAA\");");
}
TEST_F(FormatTest, UnderstandsBinaryOperators) {
@@ -4883,7 +4884,7 @@
// FIXME: We cannot handle this case yet; we might be able to figure out that
// foo<x> d > v; doesn't make sense.
- verifyFormat("foo<a < b && c> d > v;");
+ verifyFormat("foo<a<b && c> d> v;");
FormatStyle PointerMiddle = getLLVMStyle();
PointerMiddle.PointerAlignment = FormatStyle::PAS_Middle;