2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify
|
2013-06-26 06:37:05 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-06-03 17:54:50 +08:00
|
|
|
|
2013-06-26 06:37:05 +08:00
|
|
|
#ifdef PREDECLARE
|
2013-06-26 04:34:17 +08:00
|
|
|
// PR16344
|
|
|
|
// Clang has defined 'vfprint' in builtin list. If the following line occurs before any other
|
|
|
|
// `vfprintf' in this file, and we getPreviousDecl()->getTypeSourceInfo() on it, then we will
|
|
|
|
// get a null pointer since the one in builtin list doesn't has valid TypeSourceInfo.
|
|
|
|
int vfprintf(void) { return 0; }
|
2013-06-26 06:37:05 +08:00
|
|
|
#endif
|
2013-06-26 04:34:17 +08:00
|
|
|
|
|
|
|
// PR4290
|
2009-06-03 17:54:50 +08:00
|
|
|
// The following declaration is compatible with vfprintf, so we shouldn't
|
|
|
|
// warn.
|
|
|
|
int vfprintf();
|