Nick Desaulniers | a63d4f6c | 2021-06-21 11:34:23 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -verify |
| 2 | __attribute__((no_profile_instrument_function)) |
| 3 | void no_profile0(void); |
| 4 | #if !__has_attribute(no_profile_instrument_function) |
| 5 | #error "Where did the no_profile_instrument_function function attribute go?" |
| 6 | #endif |
| 7 | |
| 8 | void no_profile1(__attribute__((no_profile_instrument_function)) int param); // expected-warning {{'no_profile_instrument_function' attribute only applies to functions}} |
| 9 | __attribute__((no_profile_instrument_function(""))) // expected-error {{'no_profile_instrument_function' attribute takes no arguments}} |
| 10 | void no_profile2(void); |
| 11 | void no_profile3(void) { |
| 12 | __attribute__((no_profile_instrument_function)); // expected-error {{'no_profile_instrument_function' attribute cannot be applied to a statement}} |
| 13 | } |