brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · efce957 Raw
36 lines · c
1// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s2 3char __ptrauth(0) a;4// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'char' is invalid}}5unsigned char __ptrauth(0) b;6// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'unsigned char' is invalid}}7short __ptrauth(0) c;8// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'short' is invalid}}9unsigned short __ptrauth(0) d;10// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'unsigned short' is invalid}}11int __ptrauth(0) e;12// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'int' is invalid}}13unsigned int __ptrauth(0) f;14// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'unsigned int' is invalid}}15__int128_t __ptrauth(0) g;16// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; '__int128_t' (aka '__int128') is invalid}}17unsigned short __ptrauth(0) h;18// expected-error@-1{{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'unsigned short' is invalid}}19 20unsigned long long __ptrauth(0) i;21long long __ptrauth(0) j;22__SIZE_TYPE__ __ptrauth(0) k;23const unsigned long long __ptrauth(0) l;24const long long __ptrauth(0) m;25const __SIZE_TYPE__ __ptrauth(0) n;26 27struct S1 {28  __SIZE_TYPE__ __ptrauth(0) f0;29};30 31void x(unsigned long long __ptrauth(0) f0);32// expected-error@-1{{parameter type may not be qualified with '__ptrauth'; type is '__ptrauth(0,0,0) unsigned long long'}}33 34unsigned long long __ptrauth(0) y();35// expected-error@-1{{return type may not be qualified with '__ptrauth'; type is '__ptrauth(0,0,0) unsigned long long'}}36