diff options
Diffstat (limited to 'test/Sema/vfprintf-valid-redecl.c')
-rw-r--r-- | test/Sema/vfprintf-valid-redecl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Sema/vfprintf-valid-redecl.c b/test/Sema/vfprintf-valid-redecl.c index 5c5ce8d..8ed1878 100644 --- a/test/Sema/vfprintf-valid-redecl.c +++ b/test/Sema/vfprintf-valid-redecl.c @@ -1,7 +1,16 @@ // RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify +// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -DPREDECLARE // expected-no-diagnostics -// PR4290 +#ifdef PREDECLARE +// 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; } +#endif + +// PR4290 // The following declaration is compatible with vfprintf, so we shouldn't // warn. int vfprintf(); |