Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
clang
/
f94e215e4a67e5439d56a67bbe470c7860d4b9a6
/
.
/
test
/
Analysis
/
outofbound.c
blob: 4ab2326fcd8907a612ff97d817642dcad9cedf35 [
file
] [
log
] [
blame
]
// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
char
f1
()
{
char
*
s
=
"abcd"
;
char
c
=
s
[
4
];
// no-warning
return
s
[
5
]
+
c
;
// expected-warning{{Load or store into an out-of-bound memory position.}}
}