Skip to content

Commit 007ab6d

Browse files
author
Katherine Kjeer
committed
Remove expected free variable errors from member-reference test
1 parent bda27b4 commit 007ab6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/test/CheckedC/inferred-bounds/member-reference.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
// This line is for the clang test infrastructure:
1212
// RUN: %clang_cc1 -fcheckedc-extension -fdump-inferred-bounds -verify -verify-ignore-unexpected=warning -verify-ignore-unexpected=note -fdump-inferred-bounds %s | FileCheck %s
13+
// expected-no-diagnostics
1314

1415
struct S1 {
1516
_Array_ptr<int> p : count(len);
@@ -100,7 +101,7 @@ void f1(struct S1 a1, struct S2 b2) {
100101
int global_arr1[5];
101102
void f2(struct S1 a3) {
102103
// TODO: need bundled block.
103-
a3.p = global_arr1; // expected-error {{it is not possible to prove that the inferred bounds of a3.p imply the declared bounds of a3.p after assignment}}
104+
a3.p = global_arr1;
104105
a3.len = 5;
105106

106107
// CHECK: BinaryOperator {{0x[0-9a-f]+}} '_Array_ptr<int>' '='
@@ -347,7 +348,7 @@ int global_arr2 _Checked[5];
347348

348349
void f12(struct Interop_S1 a1) {
349350
// TODO: need bundled block.
350-
a1.p = global_arr2; // expected-error {{it is not possible to prove that the inferred bounds of a1.p imply the declared bounds of a1.p after assignment}}
351+
a1.p = global_arr2;
351352
a1.len = 5;
352353
}
353354

@@ -380,7 +381,7 @@ void f12(struct Interop_S1 a1) {
380381

381382
_Checked void f13(struct Interop_S1 a1) {
382383
// TODO: need bundled block.
383-
a1.p = global_arr2; // expected-error {{it is not possible to prove that the inferred bounds of a1.p imply the declared bounds of a1.p after assignment}}
384+
a1.p = global_arr2;
384385
a1.len = 5;
385386
}
386387

0 commit comments

Comments
 (0)