Akira Hatanaka | 7828b1e | 2015-11-13 00:42:21 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
Michael Kruse | dc5ce72 | 2018-08-03 01:21:16 +0000 | [diff] [blame] | 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}} |
Akira Hatanaka | 7828b1e | 2015-11-13 00:42:21 +0000 | [diff] [blame] | 4 | __asm__(""); |
| 5 | } |
| 6 | |
Michael Kruse | dc5ce72 | 2018-08-03 01:21:16 +0000 | [diff] [blame] | 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}} |
Akira Hatanaka | 7828b1e | 2015-11-13 00:42:21 +0000 | [diff] [blame] | 8 | __asm__(""); |
| 9 | } |
| 10 | |
Aaron Ballman | adf66b6 | 2017-11-26 20:01:12 +0000 | [diff] [blame] | 11 | int g0 __attribute__((disable_tail_calls)); // expected-warning {{'disable_tail_calls' attribute only applies to functions and Objective-C methods}} |
Akira Hatanaka | 7828b1e | 2015-11-13 00:42:21 +0000 | [diff] [blame] | 12 | |
| 13 | int foo3(int a) __attribute__((disable_tail_calls("abc"))); // expected-error {{'disable_tail_calls' attribute takes no arguments}} |