Skip to content

Commit 6694a25

Browse files
liberal_itypes_ptrptr test: Add expected-error due to compiler bug.
1 parent 27445ae commit 6694a25

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/test/3C/liberal_itypes_ptrptr.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
22
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3-
// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
3+
// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -Xclang -verify -Xclang -verify-ignore-unexpected=warning,note -x c -o /dev/null -
44
// RUN: 3c -alltypes -output-postfix=checked %s
55
// RUN: 3c -alltypes %S/liberal_itypes_ptrptr.checked.c -- | count 0
66
// RUN: rm %S/liberal_itypes_ptrptr.checked.c
@@ -142,6 +142,11 @@ void itype_defined_caller() {
142142

143143
int **e;
144144
*e = 1;
145+
// This expected error is due to
146+
// https://github.com/microsoft/checkedc-clang/issues/974. When we merge the
147+
// fix for that bug, diagnostic verification will fail and we will know to
148+
// remove the expected error.
149+
// expected-error@+1 {{it is not possible to prove argument meets declared bounds for 1st parameter}}
145150
itype_defined_ptrptr(e);
146151
//CHECK: _Ptr<int *> e = ((void *)0);
147152
//CHECK: itype_defined_ptrptr(_Assume_bounds_cast<_Ptr<_Ptr<int>>>(e));

0 commit comments

Comments
 (0)