| 1 |
// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s |
| 2 |
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s |
| 3 |
|
| 4 |
#if __aarch64__ |
| 5 |
#define VALID_DATA_KEY 2 |
| 6 |
#else |
| 7 |
#error Provide these constants if you port this test |
| 8 |
#endif |
| 9 |
|
| 10 |
int * __ptrauth(VALID_DATA_KEY) valid0; |
| 11 |
|
| 12 |
typedef int *intp; |
| 13 |
|
| 14 |
int nonConstantGlobal = 5; |
| 15 |
|
| 16 |
__ptrauth int invalid0; // expected-error{{expected '('}} |
| 17 |
__ptrauth() int invalid1; // expected-error{{expected expression}} |
| 18 |
int * __ptrauth(VALID_DATA_KEY, 1, 1000, 12) invalid12; // expected-error{{qualifier must take between 1 and 3 arguments}} |