clang-format: Correctly format alias declarations.
Before:
template <class CallbackClass>
using MyCallback = void(CallbackClass::*)(SomeObject * Data);");
After:
template <class CallbackClass>
using MyCallback = void (CallbackClass::*)(SomeObject *Data);");
Also fix three wrong indentations.
llvm-svn: 188172
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 739c0e5..f5e16d0 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -3797,9 +3797,14 @@
verifyFormat("void *(*a)(int *, SomeType *);");
verifyFormat("int (*func)(void *);");
verifyFormat("void f() { int (*func)(void *); }");
+ verifyFormat("template <class CallbackClass>\n"
+ "using MyCallback = void (CallbackClass::*)(SomeObject *Data);");
verifyGoogleFormat("A<void*(int*, SomeType*)>;");
verifyGoogleFormat("void* (*a)(int);");
+ verifyGoogleFormat(
+ "template <class CallbackClass>\n"
+ "using MyCallback = void (CallbackClass::*)(SomeObject* Data);");
// Other constructs can look somewhat like function types:
verifyFormat("A<sizeof(*x)> a;");