From 5903685a285f4993cf14d88751e285bbd8a1f562 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 12 Aug 2013 12:16:34 +0000 Subject: clang-format: Correctly format alias declarations. Before: template using MyCallback = void(CallbackClass::*)(SomeObject * Data);"); After: template using MyCallback = void (CallbackClass::*)(SomeObject *Data);"); Also fix three wrong indentations. llvm-svn: 188172 --- clang/unittests/Format/FormatTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/unittests') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 739c0e5ad94..f5e16d0e896 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3797,9 +3797,14 @@ TEST_F(FormatTest, FormatsFunctionTypes) { verifyFormat("void *(*a)(int *, SomeType *);"); verifyFormat("int (*func)(void *);"); verifyFormat("void f() { int (*func)(void *); }"); + verifyFormat("template \n" + "using MyCallback = void (CallbackClass::*)(SomeObject *Data);"); verifyGoogleFormat("A;"); verifyGoogleFormat("void* (*a)(int);"); + verifyGoogleFormat( + "template \n" + "using MyCallback = void (CallbackClass::*)(SomeObject* Data);"); // Other constructs can look somewhat like function types: verifyFormat("A a;"); -- cgit v1.2.3