Author: Paul Robinson Date: 2022-06-02T06:27:11-07:00 New Revision: b2c6251c06700bfe8a69b780cb27928d3ba029db
URL: https://github.com/llvm/llvm-project/commit/b2c6251c06700bfe8a69b780cb27928d3ba029db DIFF: https://github.com/llvm/llvm-project/commit/b2c6251c06700bfe8a69b780cb27928d3ba029db.diff LOG: [PS5] Support r and y specifiers of freebsd_kernel_printf format strings Added: Modified: clang/lib/AST/FormatString.cpp clang/test/Sema/format-strings-freebsd.c Removed: ################################################################################ diff --git a/clang/lib/AST/FormatString.cpp b/clang/lib/AST/FormatString.cpp index 102bcca96a389..4977aaa513195 100644 --- a/clang/lib/AST/FormatString.cpp +++ b/clang/lib/AST/FormatString.cpp @@ -760,7 +760,7 @@ bool FormatSpecifier::hasValidLengthModifier(const TargetInfo &Target, return true; case ConversionSpecifier::FreeBSDrArg: case ConversionSpecifier::FreeBSDyArg: - return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS4(); + return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS(); default: return false; } @@ -795,7 +795,7 @@ bool FormatSpecifier::hasValidLengthModifier(const TargetInfo &Target, return true; case ConversionSpecifier::FreeBSDrArg: case ConversionSpecifier::FreeBSDyArg: - return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS4(); + return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS(); default: return false; } diff --git a/clang/test/Sema/format-strings-freebsd.c b/clang/test/Sema/format-strings-freebsd.c index 965d7c287be65..64b526eb2f076 100644 --- a/clang/test/Sema/format-strings-freebsd.c +++ b/clang/test/Sema/format-strings-freebsd.c @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify -triple i386-unknown-freebsd %s // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-freebsd %s // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-scei-ps4 %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-sie-ps5 %s // Test FreeBSD kernel printf extensions. int freebsd_kernel_printf(const char *, ...) __attribute__((__format__(__freebsd_kprintf__, 1, 2))); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits