aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/no_profile_instrument_function-attribute.c
blob: 4ede13c741077f5ac7d9ad5fcebc14a76a242337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 %s -fsyntax-only -verify
__attribute__((no_profile_instrument_function))
void no_profile0(void);
#if !__has_attribute(no_profile_instrument_function)
#error "Where did the no_profile_instrument_function function attribute go?"
#endif

void no_profile1(__attribute__((no_profile_instrument_function)) int param); // expected-warning {{'no_profile_instrument_function' attribute only applies to functions}}
__attribute__((no_profile_instrument_function(""))) // expected-error {{'no_profile_instrument_function' attribute takes no arguments}}
void no_profile2(void);
void no_profile3(void) {
  __attribute__((no_profile_instrument_function)); // expected-error {{'no_profile_instrument_function' attribute cannot be applied to a statement}}
}