================
@@ -12720,6 +12735,21 @@ TEST_F(FormatTest, UnderstandsPointerQualifiersInCast) 
{
   verifyFormat(("x = (foo *" + AllQualifiers + " __my_qualifier)&v;").str(),
                CustomQualifier);
 
+  // Check additional attribute macros in Google style:
+  FormatStyle LongPointerRightGoogle = getGoogleStyleWithColumns(999);
+  FormatStyle LongPointerLeftGoogle = getGoogleStyleWithColumns(999);
+  LongPointerLeftGoogle.PointerAlignment = FormatStyle::PAS_Left;
+  Twine AllQualifiersPlusGoogle =
+      AllQualifiers + " absl_nonnull absl_nullable absl_nullability_unknown";
+  verifyFormat(("x = (foo *" + AllQualifiersPlusGoogle + ")*v;").str(),
+               LongPointerRightGoogle);
+  verifyFormat(("x = (foo* " + AllQualifiersPlusGoogle + ")*v;").str(),
+               LongPointerLeftGoogle);
+  verifyFormat(("x = (foo *" + AllQualifiersPlusGoogle + ")&v;").str(),
+               LongPointerRightGoogle);
+  verifyFormat(("x = (foo* " + AllQualifiersPlusGoogle + ")&v;").str(),
+               LongPointerLeftGoogle);
+
----------------
jvoung wrote:

Done

https://github.com/llvm/llvm-project/pull/130346
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to