summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
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 <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;");
OpenPOWER on IntegriCloud