Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify -fms-extensions -x=objective-c++ %s |
Steve Naroff | 239f073 | 2008-12-25 14:16:32 +0000 | [diff] [blame] | 2 | __stdcall int func0(); |
| 3 | int __stdcall func(); |
| 4 | typedef int (__cdecl *tptr)(); |
| 5 | void (*__fastcall fastpfunc)(); |
| 6 | extern __declspec(dllimport) void __stdcall VarR4FromDec(); |
| 7 | __declspec(deprecated) __declspec(deprecated) char * __cdecl ltoa( long _Val, char * _DstBuf, int _Radix); |
| 8 | __declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory ); |
Steve Naroff | 86bc6cf | 2008-12-25 14:41:26 +0000 | [diff] [blame] | 9 | typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR; |
| 10 | void * __ptr64 PtrToPtr64(const void *p) |
| 11 | { |
| 12 | return((void * __ptr64) (unsigned __int64) (ULONG_PTR)p ); |
| 13 | } |
Chris Lattner | 35d276f | 2009-02-27 18:53:28 +0000 | [diff] [blame] | 14 | __forceinline InterlockedBitTestAndSet (long *Base, long Bit) // expected-warning {{type specifier missing, defaults to 'int'}} |
Steve Naroff | 86bc6cf | 2008-12-25 14:41:26 +0000 | [diff] [blame] | 15 | { |
| 16 | __asm { |
| 17 | mov eax, Bit |
| 18 | mov ecx, Base |
| 19 | lock bts [ecx], eax |
| 20 | setc al |
| 21 | }; |
| 22 | } |
| 23 | |
Steve Naroff | 47f5209 | 2009-01-06 19:34:12 +0000 | [diff] [blame] | 24 | void *_alloca(int); |
| 25 | |
| 26 | void foo() { |
| 27 | __declspec(align(16)) int *buffer = (int *)_alloca(9); |
| 28 | } |
Douglas Gregor | 5a2f5d3 | 2009-01-10 00:48:18 +0000 | [diff] [blame] | 29 | |
| 30 | typedef bool (__stdcall __stdcall *blarg)(int); |