diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 565b125dd1bce8..14942d1ba420ea 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -9719,9 +9719,9 @@ TEST_F(FormatTest, UnderstandsFunctionRefQualification) { "void b() &;\n"; verifyFormat(Prefix + "int* x;", DerivePointerAlignment); verifyFormat(Prefix + "int *x;", DerivePointerAlignment); - // Same if the function is an overloaded operator instead. - Prefix = "void operator()() &;\n" - "void operator()() &;\n"; + // Same if the function is an overloaded operator, and with &&. + Prefix = "void operator()() &&;\n" + "void operator()() &&;\n"; verifyFormat(Prefix + "int* x;", DerivePointerAlignment); verifyFormat(Prefix + "int *x;", DerivePointerAlignment); // However a space between cv-qualifiers and ref-qualifiers *is* evidence.