summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a5a26b5c1e8..4d39fa933e8 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -15036,6 +15036,13 @@ TEST_F(FormatTest, OperatorSpacing) {
verifyFormat("Foo::operator&&();", Style);
verifyFormat("operator&&(int(&&)(), class Foo);", Style);
+ // PR45107
+ verifyFormat("operator Vector<String>&();", Style);
+ verifyFormat("operator foo::Bar*();", Style);
+ verifyFormat("operator const Foo<X>::Bar<Y>*();", Style);
+ verifyFormat("operator/*a*/ const /*b*/ Foo /*c*/<X> /*d*/ ::Bar<Y>*();",
+ Style);
+
Style.PointerAlignment = FormatStyle::PAS_Middle;
verifyFormat("Foo::operator*();", Style);
verifyFormat("Foo::operator void *();", Style);
OpenPOWER on IntegriCloud