[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / attr-naked.cpp
blobeaa8e223b83e10c5b85596ccce26e3a25857a321
1 // RUN: %clang_cc1 %s -verify -fsyntax-only -triple arm-none-linux
2 class Foo {
3 void bar();
4 static void bar2();
5 unsigned v;
6 static unsigned s;
7 };
9 void __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}}
13 void __attribute__((naked)) Foo::bar2() {
14 asm("mov r2, %0" : : "r"(s)); // static member reference is OK