blob: 0545e951e60e2b64277fbea50dd289830c427e02 [file] [log] [blame]
Akira Hatanaka7828b1e2015-11-13 00:42:21 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
Michael Krusedc5ce722018-08-03 01:21:16 +00003void __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}}
Akira Hatanaka7828b1e2015-11-13 00:42:21 +00004 __asm__("");
5}
6
Michael Krusedc5ce722018-08-03 01:21:16 +00007void __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}}
Akira Hatanaka7828b1e2015-11-13 00:42:21 +00008 __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}}