19 lines · c
1// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -std=c992// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE -std=c993 4#ifdef PREDECLARE5// PR163446// Clang has defined 'vfprint' in builtin list. If the following line occurs before any other7// `vfprintf' in this file, and we getPreviousDecl()->getTypeSourceInfo() on it, then we will8// get a null pointer since the one in builtin list doesn't has valid TypeSourceInfo.9int vfprintf(void) { return 0; } // expected-warning {{requires inclusion of the header <stdio.h>}}10#endif11 12// PR429013// The following declaration is compatible with vfprintf, so we shouldn't14// reject.15int vfprintf(); // expected-warning {{a function declaration without a prototype is deprecated in all versions of C}}16#ifndef PREDECLARE17// expected-warning@-2 {{requires inclusion of the header <stdio.h>}}18#endif19