Skip to content

Commit 57751d1

Browse files
committed
NFC Mention the size of the array in its name
1 parent 3d4953f commit 57751d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/Analysis/out-of-bounds-new.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,18 @@ int test_reference_that_might_be_after_the_end(int idx) {
181181
}
182182

183183
// From: https://github.com/llvm/llvm-project/issues/100762
184-
extern int arr[10];
184+
extern int arrOf10[10];
185185
void using_builtin(int x) {
186186
__builtin_assume(x > 101); // CallExpr
187-
arr[x] = 404; // expected-warning{{Out of bound access to memory}}
187+
arrOf10[x] = 404; // expected-warning{{Out of bound access to memory}}
188188
}
189189

190190
void using_assume_attr(int ax) {
191191
[[assume(ax > 100)]]; // NullStmt with an "assume" attribute.
192-
arr[ax] = 405; // expected-warning{{Out of bound access to memory}}
192+
arrOf10[ax] = 405; // expected-warning{{Out of bound access to memory}}
193193
}
194194

195195
void using_many_assume_attr(int yx) {
196196
[[assume(yx > 104), assume(yx > 200), assume(yx < 300)]]; // NullStmt with an attribute
197-
arr[yx] = 406; // expected-warning{{Out of bound access to memory}}
197+
arrOf10[yx] = 406; // expected-warning{{Out of bound access to memory}}
198198
}

0 commit comments

Comments
 (0)