blob: bb274b0d5dfa9d53ee77825e8de973db0fb82da9 [file] [log] [blame]
Zhongxing Xu7caf9b32010-08-02 04:56:14 +00001// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store=flat -verify %s
2#define FAIL ((void)*(char*)0)
3struct simple { int x; };
4
5void PR7297 () {
6 struct simple a;
7 struct simple *p = &a;
8 p->x = 5;
9 if (!p[0].x) FAIL; // no-warning
10 if (p[0].x) FAIL; // expected-warning {{null}}
11}