aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/MicrosoftExtensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/MicrosoftExtensions.c')
-rw-r--r--test/Parser/MicrosoftExtensions.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c
new file mode 100644
index 000000000000..6f5622e93932
--- /dev/null
+++ b/test/Parser/MicrosoftExtensions.c
@@ -0,0 +1,30 @@
+// RUN: clang-cc -fsyntax-only -verify -fms-extensions -x=objective-c++ %s
+__stdcall int func0();
+int __stdcall func();
+typedef int (__cdecl *tptr)();
+void (*__fastcall fastpfunc)();
+extern __declspec(dllimport) void __stdcall VarR4FromDec();
+__declspec(deprecated) __declspec(deprecated) char * __cdecl ltoa( long _Val, char * _DstBuf, int _Radix);
+__declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory );
+typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;
+void * __ptr64 PtrToPtr64(const void *p)
+{
+ return((void * __ptr64) (unsigned __int64) (ULONG_PTR)p );
+}
+__forceinline InterlockedBitTestAndSet (long *Base, long Bit) // expected-warning {{type specifier missing, defaults to 'int'}}
+{
+ __asm {
+ mov eax, Bit
+ mov ecx, Base
+ lock bts [ecx], eax
+ setc al
+ };
+}
+
+void *_alloca(int);
+
+void foo() {
+ __declspec(align(16)) int *buffer = (int *)_alloca(9);
+}
+
+typedef bool (__stdcall __stdcall *blarg)(int);