mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 14:20:33 -04:00
Add printf0 support. [1] Install the clang C headers (excluding std*.h since we have our own) now that the installer puts them somewhere sane. Submitted by: ed
39 lines
935 B
C++
39 lines
935 B
C++
|
|
$FreeBSD$
|
|
|
|
--- tools/clang/lib/Sema/SemaChecking.cpp.orig
|
|
+++ tools/clang/lib/Sema/SemaChecking.cpp
|
|
@@ -142,7 +142,7 @@
|
|
|
|
// Printf checking.
|
|
if (const FormatAttr *Format = FDecl->getAttr<FormatAttr>()) {
|
|
- if (Format->getType() == "printf") {
|
|
+ if (Format->getType() == "printf" || Format->getType() == "printf0") {
|
|
bool HasVAListArg = Format->getFirstArg() == 0;
|
|
if (!HasVAListArg) {
|
|
if (const FunctionProtoType *Proto
|
|
@@ -701,7 +701,6 @@
|
|
case 'u':
|
|
case 'x':
|
|
case 'X':
|
|
- case 'D':
|
|
case 'O':
|
|
case 'U':
|
|
case 'e':
|
|
@@ -717,9 +716,16 @@
|
|
case 'S':
|
|
case 's':
|
|
case 'p':
|
|
+ case 'r':
|
|
+ case 'y':
|
|
++numConversions;
|
|
CurrentState = state_OrdChr;
|
|
break;
|
|
+ case 'b':
|
|
+ case 'D':
|
|
+ numConversions += 2;
|
|
+ CurrentState = state_OrdChr;
|
|
+ break;
|
|
|
|
// CHECK: Are we using "%n"? Issue a warning.
|
|
case 'n': {
|