You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
455 B
16 lines
455 B
4 months ago
|
// RUN: %clang_cc1 %s -verify -fsyntax-only -triple arm-none-linux
|
||
|
class Foo {
|
||
|
void bar();
|
||
|
static void bar2();
|
||
|
unsigned v;
|
||
|
static unsigned s;
|
||
|
};
|
||
|
|
||
|
void __attribute__((naked)) Foo::bar() { // expected-note{{attribute is here}}
|
||
|
asm("mov r2, %0" : : "r"(v)); // expected-error{{'this' pointer references not allowed in naked functions}}
|
||
|
}
|
||
|
|
||
|
void __attribute__((naked)) Foo::bar2() {
|
||
|
asm("mov r2, %0" : : "r"(s)); // static member reference is OK
|
||
|
}
|