blob: d9fa5423d9ef37acdb31d1d8f717756a753088a9 [file] [log] [blame]
Daniel Dunbardd0cb222010-09-29 18:20:25 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only
2
John McCalld6b8de02011-01-25 03:51:08 +00003int a __attribute__((naked)); // expected-warning {{'naked' attribute only applies to functions}}
Daniel Dunbardd0cb222010-09-29 18:20:25 +00004
Douglas Gregor15be9b02011-07-11 15:24:01 +00005__attribute__((naked)) int t0(void) {
6 __asm__ volatile("mov r0, #0");
7}
8
Daniel Dunbardd0cb222010-09-29 18:20:25 +00009void t1() __attribute__((naked));
10
John McCallbdc49d32011-03-02 12:15:05 +000011void t2() __attribute__((naked(2))); // expected-error {{attribute takes no arguments}}
Daniel Dunbardd0cb222010-09-29 18:20:25 +000012