You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/SemaCXX/ptrauth-qualifier.cpp
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,16 @@ namespace test_union {
120
120
}
121
121
}
122
122
123
+
booltest_composite_type0(bool c, int * AQ * a0, int * AQ * a1) {
124
+
auto t = c ? a0 : a1;
125
+
return a0 == a1;
126
+
}
127
+
128
+
booltest_composite_type1(bool c, int * AQ * a0, int * AQ2 * a1) {
129
+
auto t = c ? a0 : a1; // expected-error {{incompatible operand types ('int *__ptrauth(1,1,50) *' and 'int *__ptrauth(1,1,51) *')}}
130
+
return a0 == a1; // expected-error {{comparison of distinct pointer types ('int *__ptrauth(1,1,50) *' and 'int *__ptrauth(1,1,51) *')}}
131
+
}
132
+
123
133
voidtest_bad_call_diag(void *AQ* ptr); // expected-note{{candidate function not viable: 1st argument ('void *__ptrauth(1,1,51) *') has __ptrauth(1,1,51) qualifier, but parameter has __ptrauth(1,1,50) qualifier}} expected-note{{candidate function not viable: 1st argument ('void **') has no ptrauth qualifier, but parameter has __ptrauth(1,1,50) qualifier}}
124
134
voidtest_bad_call_diag2(void ** ptr); // expected-note{{1st argument ('void *__ptrauth(1,1,50) *') has __ptrauth(1,1,50) qualifier, but parameter has no ptrauth qualifier}}
0 commit comments