blob: eaa8e223b83e10c5b85596ccce26e3a25857a321 [file] [log] [blame]
Weiming Zhao71ac2402015-02-03 22:35:58 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only -triple arm-none-linux
2class Foo {
3 void bar();
4 static void bar2();
5 unsigned v;
6 static unsigned s;
7};
8
9void __attribute__((naked)) Foo::bar() { // expected-note{{attribute is here}}
10 asm("mov r2, %0" : : "r"(v)); // expected-error{{'this' pointer references not allowed in naked functions}}
11}
12
13void __attribute__((naked)) Foo::bar2() {
14 asm("mov r2, %0" : : "r"(s)); // static member reference is OK
15}