| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}} |
| 4 |
__asm__(""); |
| 5 |
} |
| 6 |
|
| 7 |
void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}} |
| 8 |
__asm__(""); |
| 9 |
} |
| 10 |
|
| 11 |
int g0 __attribute__((disable_tail_calls)); // expected-warning {{'disable_tail_calls' attribute only applies to functions and Objective-C methods}} |
| 12 |
|
| 13 |
int foo3(int a) __attribute__((disable_tail_calls("abc"))); // expected-error {{'disable_tail_calls' attribute takes no arguments}} |
| 14 |
|
| 15 |
__attribute__((naked)) void foo4(void); // expected-note {{conflicting attribute is here}} |
| 16 |
__attribute__((disable_tail_calls)) void foo4(void); // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} |
| 17 |
|
| 18 |
__attribute__((disable_tail_calls)) void foo5(void); // expected-note {{conflicting attribute is here}} |
| 19 |
__attribute__((naked)) void foo5(void); // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} |