summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/outofbound.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/outofbound.c')
-rw-r--r--clang/test/Analysis/outofbound.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Analysis/outofbound.c b/clang/test/Analysis/outofbound.c
index 24766be9183..305d5e56cbb 100644
--- a/clang/test/Analysis/outofbound.c
+++ b/clang/test/Analysis/outofbound.c
@@ -49,3 +49,8 @@ void f6() {
int *b = (int*)a;
b[1] = 3; // expected-warning{{out-of-bound}}
}
+
+void f7() {
+ struct three_words a;
+ a.c[3] = 1; // expected-warning{{out-of-bound}}
+}
OpenPOWER on IntegriCloud