Author: cem Date: Sat May 9 19:26:44 2020 New Revision: 360852 URL: https://svnweb.freebsd.org/changeset/base/360852
Log: clang: Reject %n for __attribute__((format(__freebsd_kprintf__))) A follow-up to r360849. Reported by: imp Reviewed by: emaste, imp X-MFC-With: r360849 Differential Revision: https://reviews.freebsd.org/D24786 Modified: head/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp Modified: head/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp Sat May 9 17:52:50 2020 (r360851) +++ head/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp Sat May 9 19:26:44 2020 (r360852) @@ -316,8 +316,8 @@ static PrintfSpecifierResult ParsePrintfSpecifier(Form case 'g': k = ConversionSpecifier::gArg; break; case 'i': k = ConversionSpecifier::iArg; break; case 'n': - // Not handled, but reserved in OpenCL. - if (!LO.OpenCL) + // Not handled, but reserved in OpenCL and FreeBSD kernel. + if (!LO.OpenCL && !isFreeBSDKPrintf) k = ConversionSpecifier::nArg; break; case 'o': k = ConversionSpecifier::oArg; break; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"