blob: e8f5bcc73ee87b9be241cd9c98472c06387c4c74 [file] [log] [blame]
Akira Hatanaka7828b1e2015-11-13 00:42:21 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}}
4 __asm__("");
5}
6
7void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}}
8 __asm__("");
9}
10
Aaron Ballmanadf66b62017-11-26 20:01:12 +000011int g0 __attribute__((disable_tail_calls)); // expected-warning {{'disable_tail_calls' attribute only applies to functions and Objective-C methods}}
Akira Hatanaka7828b1e2015-11-13 00:42:21 +000012
13int foo3(int a) __attribute__((disable_tail_calls("abc"))); // expected-error {{'disable_tail_calls' attribute takes no arguments}}