mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-27 07:19:03 -04:00

MSDN (https://msdn.microsoft.com/en-us/library/h5w10wxs.aspx) indicates that `__declspec(naked)` is only permitted on x86 and ARM targets. Testing with cl does confirm this behaviour. Provide a warning for use of `__declspec(naked)` on x64. llvm-svn: 299774
12 lines
508 B
C
12 lines
508 B
C
// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fsyntax-only -fdeclspec -verify %s
|
|
// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fsyntax-only -fdeclspec -verify %s
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fsyntax-only -fdeclspec -verify %s
|
|
#if defined(_M_IX86) || defined(_M_ARM)
|
|
// CHECK: expected-no-diagnostics
|
|
#endif
|
|
|
|
void __declspec(naked) f(void) {}
|
|
#if !defined(_M_IX86) && !defined(_M_ARM)
|
|
// expected-error@-2{{'naked' attribute is not supported on 'x86_64'}}
|
|
#endif
|