1f4a2713aSLionel Sambuc // rdar://10588825 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc // Test this without pch. 4f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc // Test with pch. 7f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-pch -o %t 8f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only 9f4a2713aSLionel Sambuc 10f4a2713aSLionel Sambuc // expected-no-diagnostics 11f4a2713aSLionel Sambuc 12f4a2713aSLionel Sambuc #ifndef HEADER 13f4a2713aSLionel Sambuc #define HEADER 14f4a2713aSLionel Sambuc 15*0a6a1f1dSLionel Sambuc #ifdef __stdcall 16*0a6a1f1dSLionel Sambuc // __stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32. 17*0a6a1f1dSLionel Sambuc #undef __stdcall 18*0a6a1f1dSLionel Sambuc #endif 19*0a6a1f1dSLionel Sambuc 20f4a2713aSLionel Sambuc #define __stdcall 21f4a2713aSLionel Sambuc #define STDCALL __stdcall 22f4a2713aSLionel Sambuc 23f4a2713aSLionel Sambuc void STDCALL Foo(void); 24f4a2713aSLionel Sambuc 25f4a2713aSLionel Sambuc #else 26f4a2713aSLionel Sambuc Foo(void)27f4a2713aSLionel Sambucvoid STDCALL Foo(void) 28f4a2713aSLionel Sambuc { 29f4a2713aSLionel Sambuc } 30f4a2713aSLionel Sambuc 31f4a2713aSLionel Sambuc #endif 32