xref: /llvm-project/clang/test/Headers/typedef_guards.c (revision 7de71613049fa1333ef819b6dc740356ff4efff5)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 
4 // NULL is rdefined in stddef.h
5 #define NULL ((void*) 0)
6 
7 // These are headers bundled with Clang.
8 #include <stdarg.h>
9 #include <stddef.h>
10 
11 #ifndef _VA_LIST
12 typedef __builtin_va_list va_list;
13 #endif
14 
15 #ifndef _SIZE_T
16 typedef __typeof__(sizeof(int)) size_t;
17 #endif
18 
19 #ifndef _WCHAR_T
20 typedef __typeof__(*L"") wchar_t;
21 #endif
22 
23 extern void foo(wchar_t x);
24 extern void bar(size_t x);
baz(void)25 void *baz(void) { return NULL; }
quz(void)26 void quz(void) {
27   va_list y;
28 }
29 
30