================ @@ -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 cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits