blob: 8ed18786ab7e92ef0303bf1318cbac2ee05b3872 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify
Richard Smith71bdbb02013-06-25 22:37:05 +00002// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE
Andy Gibbsc6e68da2012-10-19 12:44:48 +00003// expected-no-diagnostics
Eli Friedman8246b6f2009-06-03 09:54:50 +00004
Richard Smith71bdbb02013-06-25 22:37:05 +00005#ifdef PREDECLARE
Richard Smithef87be32013-06-25 20:34:17 +00006// PR16344
7// Clang has defined 'vfprint' in builtin list. If the following line occurs before any other
8// `vfprintf' in this file, and we getPreviousDecl()->getTypeSourceInfo() on it, then we will
9// get a null pointer since the one in builtin list doesn't has valid TypeSourceInfo.
10int vfprintf(void) { return 0; }
Richard Smith71bdbb02013-06-25 22:37:05 +000011#endif
Richard Smithef87be32013-06-25 20:34:17 +000012
13// PR4290
Eli Friedman8246b6f2009-06-03 09:54:50 +000014// The following declaration is compatible with vfprintf, so we shouldn't
15// warn.
16int vfprintf();