1 // RUN: %clang_cc1 %s -verify -fsyntax-only -triple arm-none-linux
2 // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -DDECLSPEC -triple i686-pc-win32
11 void __attribute__((naked
)) Foo::bar() { // expected-note{{attribute is here}}
12 asm("mov r2, %0" : : "r"(v
)); // expected-error{{'this' pointer references not allowed in naked functions}}
15 void __attribute__((naked
)) Foo::bar2() {
16 asm("mov r2, %0" : : "r"(s
)); // static member reference is OK
21 __declspec(naked
) void func1(); // expected-error {{'naked' attribute only applies to non-member functions}}
22 __declspec(naked
) static void func2(); // expected-error {{'naked' attribute only applies to non-member functions}}
24 __attribute__((naked
)) void func3(); // OK
25 __attribute__((naked
)) static void func4(); // OK