1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE 3*f4a2713aSLionel Sambuc // expected-no-diagnostics 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc #ifdef PREDECLARE 6*f4a2713aSLionel Sambuc // PR16344 7*f4a2713aSLionel Sambuc // Clang has defined 'vfprint' in builtin list. If the following line occurs before any other 8*f4a2713aSLionel Sambuc // `vfprintf' in this file, and we getPreviousDecl()->getTypeSourceInfo() on it, then we will 9*f4a2713aSLionel Sambuc // get a null pointer since the one in builtin list doesn't has valid TypeSourceInfo. vfprintf(void)10*f4a2713aSLionel Sambucint vfprintf(void) { return 0; } 11*f4a2713aSLionel Sambuc #endif 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc // PR4290 14*f4a2713aSLionel Sambuc // The following declaration is compatible with vfprintf, so we shouldn't 15*f4a2713aSLionel Sambuc // warn. 16*f4a2713aSLionel Sambuc int vfprintf(); 17