xref: /llvm-project/clang/test/PCH/single-token-macro.c (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1 // Test this without pch.
2 // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
3 
4 // Test with pch.
5 // RUN: %clang_cc1 %s -emit-pch -o %t
6 // RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only
7 
8 // expected-no-diagnostics
9 
10 #ifndef HEADER
11 #define HEADER
12 
13 #ifdef __stdcall
14 // __stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32.
15 #undef __stdcall
16 #endif
17 
18 #define __stdcall
19 #define STDCALL __stdcall
20 
21 void STDCALL Foo(void);
22 
23 #else
24 
Foo(void)25 void STDCALL Foo(void)
26 {
27 }
28 
29 #endif
30