blob: 0fa1abdbd8ab4a9ac41c17a7e299d3510de266c9 [file] [log] [blame]
Fangrui Songa44c4342020-01-04 15:39:19 -08001// RUN: %clang_cc1 -triple aarch64 -fsyntax-only -verify %s
2
3// expected-error@+1 {{'patchable_function_entry' attribute takes at least 1 argument}}
4__attribute__((patchable_function_entry)) void f();
5
6// expected-error@+1 {{'patchable_function_entry' attribute takes no more than 2 arguments}}
7__attribute__((patchable_function_entry(0, 0, 0))) void f();
8
9// expected-error@+1 {{'patchable_function_entry' attribute requires a non-negative integral compile time constant expression}}
10__attribute__((patchable_function_entry(-1))) void f();
11
12int i;
13// expected-error@+1 {{'patchable_function_entry' attribute requires parameter 0 to be an integer constant}}
14__attribute__((patchable_function_entry(i))) void f();
15
Fangrui Song69bf40c2020-01-20 14:30:06 -080016// expected-error@+1 {{'patchable_function_entry' attribute requires integer constant between 0 and 2 inclusive}}
17__attribute__((patchable_function_entry(2, 3))) void f();