diff options
| author | Martell Malone <martellmalone@gmail.com> | 2015-08-14 18:00:09 +0000 |
|---|---|---|
| committer | Martell Malone <martellmalone@gmail.com> | 2015-08-14 18:00:09 +0000 |
| commit | 7ccda3c38b5cd2bcc21487039ec8d354a9d30286 (patch) | |
| tree | 663c6080cc783e3647a8071755844aa967f709aa /clang/test/Parser | |
| parent | ed502905f7c285959c5555bc01f8af762dadb8d6 (diff) | |
| download | bcm5719-llvm-7ccda3c38b5cd2bcc21487039ec8d354a9d30286.tar.gz bcm5719-llvm-7ccda3c38b5cd2bcc21487039ec8d354a9d30286.zip | |
Windows ARM: ignore calling conventions as described on MSDN
Summary:
MSDN says that fastcall, stdcall, thiscall, and vectorcall are all
accepted but ignored on ARM and X64.
https://msdn.microsoft.com/en-us/library/984x0h58.aspx
MSDN also says cdecl is also accepted and typically ignored
This patch brings ARM in line with how we ignore them for X64
Reviewers: rnk
Subscribers: compnerd, cfe-commits
Differential Revision: http://reviews.llvm.org/D12034
llvm-svn: 245076
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/arm-windows-calling-convention-handling.c | 5 | ||||
| -rw-r--r-- | clang/test/Parser/x64-windows-calling-convention-handling.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/clang/test/Parser/arm-windows-calling-convention-handling.c b/clang/test/Parser/arm-windows-calling-convention-handling.c index 7717aada53a..ee25e601931 100644 --- a/clang/test/Parser/arm-windows-calling-convention-handling.c +++ b/clang/test/Parser/arm-windows-calling-convention-handling.c @@ -1,10 +1,9 @@ // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only -verify %s -int __cdecl cdecl(int a, int b, int c, int d) { // expected-warning {{calling convention '__cdecl' ignored for this target}} +int __cdecl cdecl(int a, int b, int c, int d) { // expected-no-diagnostics return a + b + c + d; } -float __stdcall stdcall(float a, float b, float c, float d) { // expected-warning {{calling convention '__stdcall' ignored for this target}} +float __stdcall stdcall(float a, float b, float c, float d) { // expected-no-diagnostics return a + b + c + d; } - diff --git a/clang/test/Parser/x64-windows-calling-convention-handling.c b/clang/test/Parser/x64-windows-calling-convention-handling.c new file mode 100644 index 00000000000..c0276634148 --- /dev/null +++ b/clang/test/Parser/x64-windows-calling-convention-handling.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple x86_64-windows -fms-compatibility -fsyntax-only -verify %s + +int __cdecl cdecl(int a, int b, int c, int d) { // expected-no-diagnostics + return a + b + c + d; +} + +float __stdcall stdcall(float a, float b, float c, float d) { // expected-no-diagnostics + return a + b + c + d; +} |

