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