Splitting this test case into two because the behavior for the calling convention...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 2 Oct 2012 14:56:00 +0000 (14:56 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 2 Oct 2012 14:56:00 +0000 (14:56 +0000)
llvm-svn: 165016

clang/test/Sema/MicrosoftCompatibility-x86.c [new file with mode: 0644]
clang/test/Sema/MicrosoftCompatibility.c

diff --git a/clang/test/Sema/MicrosoftCompatibility-x86.c b/clang/test/Sema/MicrosoftCompatibility-x86.c
new file mode 100644 (file)
index 0000000..758f570
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility -triple i386-pc-win32\r
+int __stdcall f(void); /* expected-note {{previous declaration is here}} */\r
+\r
+int __cdecl f(void) { /* expected-error {{function declared 'cdecl' here was previously declared 'stdcall'}} */\r
+  return 0;\r
+}\r
index be13949..6330c15 100644 (file)
@@ -19,9 +19,3 @@ __declspec(align(32768)) struct S1 { int a; } s;      /* expected-error {{requested a
 struct __declspec(aligned) S2 {}; /* expected-warning {{unknown __declspec attribute 'aligned' ignored}} */
 
 struct __declspec(appdomain) S3 {}; /* expected-warning {{__declspec attribute 'appdomain' is not supported}} */
-
-int __stdcall f(void); /* expected-note {{previous declaration is here}} */
-
-int __cdecl f(void) { /* expected-error {{function declared 'cdecl' here was previously declared 'stdcall'}} */
-  return 0;
-}