Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 2020 19:26:44 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360852 - head/contrib/llvm-project/clang/lib/AST
Message-ID:  <202005091926.049JQiHZ080689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005091926.049JQiHZ080689>