Index: include/clang/Basic/Builtins.def =================================================================== --- include/clang/Basic/Builtins.def +++ include/clang/Basic/Builtins.def @@ -710,7 +710,7 @@ LANGBUILTIN(_InterlockedExchange, "LiLiD*Li", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangePointer, "v*v*D*v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedIncrement, "LiLiD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(__noop, "i.", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(__noop, "i.", "nt", ALL_MS_LANGUAGES) LANGBUILTIN(__readfsdword, "ULiULi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__va_start, "vc**.", "nt", ALL_MS_LANGUAGES) @@ -753,7 +753,7 @@ LIBBUILTIN(snprintf, "ic*zcC*.", "fp:2:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(sprintf, "ic*cC*.", "fp:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vprintf, "icC*a", "fP:0:", "stdio.h", ALL_LANGUAGES) -LIBBUILTIN(vfprintf, "i.", "fP:1:", "stdio.h", ALL_LANGUAGES) +LIBBUILTIN(vfprintf, "iP*cC*a", "fP:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vsnprintf, "ic*zcC*a", "fP:2:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vsprintf, "ic*cC*a", "fP:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(scanf, "icC*R.", "fs:0:", "stdio.h", ALL_LANGUAGES) Index: lib/AST/ASTContext.cpp =================================================================== --- lib/AST/ASTContext.cpp +++ lib/AST/ASTContext.cpp @@ -7859,10 +7859,6 @@ bool Variadic = (TypeStr[0] == '.'); - // We really shouldn't be making a no-proto type here, especially in C++. - if (ArgTypes.empty() && Variadic) - return getFunctionNoProtoType(ResType, EI); - FunctionProtoType::ExtProtoInfo EPI; EPI.ExtInfo = EI; EPI.Variadic = Variadic; Index: test/Sema/vfprintf-invalid-redecl.c =================================================================== --- test/Sema/vfprintf-invalid-redecl.c +++ test/Sema/vfprintf-invalid-redecl.c @@ -3,4 +3,4 @@ // The following declaration is not compatible with vfprintf(), but make // sure this isn't an error: autoconf expects this to build. -char vfprintf(); // expected-warning {{incompatible redeclaration of library function 'vfprintf'}} expected-note {{'vfprintf' is a builtin}} +char vfprintf(); // expected-warning {{declaration of built-in function 'vfprintf' requires inclusion of the header }} Index: test/Sema/vfprintf-valid-redecl.c =================================================================== --- test/Sema/vfprintf-valid-redecl.c +++ test/Sema/vfprintf-valid-redecl.c @@ -1,6 +1,5 @@ // RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE -// expected-no-diagnostics +// RUN: %clang_cc1 %s -fsyntax-only -pedantic -DPREDECLARE #ifdef PREDECLARE // PR16344 @@ -11,6 +10,5 @@ #endif // PR4290 -// The following declaration is compatible with vfprintf, so we shouldn't -// warn. -int vfprintf(); +// The following declaration is compatible with vfprintf, so it should not be an error. +int vfprintf(); // expected-warning {{declaration of built-in function 'vfprintf' requires inclusion of the header }}