From d44e43e46f81cc83b8f1e4384724a9923426bb2a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 2 Oct 2012 14:56:00 +0000 Subject: [PATCH] Splitting this test case into two because the behavior for the calling convention code is target-specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165016 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/MicrosoftCompatibility-x86.c | 6 ++++++ test/Sema/MicrosoftCompatibility.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 test/Sema/MicrosoftCompatibility-x86.c diff --git a/test/Sema/MicrosoftCompatibility-x86.c b/test/Sema/MicrosoftCompatibility-x86.c new file mode 100644 index 0000000000..758f570f13 --- /dev/null +++ b/test/Sema/MicrosoftCompatibility-x86.c @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility -triple i386-pc-win32 +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; +} diff --git a/test/Sema/MicrosoftCompatibility.c b/test/Sema/MicrosoftCompatibility.c index be13949ddd..6330c15667 100644 --- a/test/Sema/MicrosoftCompatibility.c +++ b/test/Sema/MicrosoftCompatibility.c @@ -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; -} -- 2.40.0