File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
clang/test/CheckedC/inferred-bounds Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 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
1415struct S1 {
1516 _Array_ptr < int > p : count (len );
@@ -100,7 +101,7 @@ void f1(struct S1 a1, struct S2 b2) {
100101int global_arr1 [5 ];
101102void 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
348349void 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
You can’t perform that action at this time.
0 commit comments