blob: f9ac589797a8d9893a087f94667fa04cc49b429e [file] [log] [blame]
Ted Kremenek2f2692f2010-02-05 02:06:54 +00001// RUN: %clang_cc1 -analyzer-check-objc-mem -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s
2// RUN: %clang_cc1 -analyzer-check-objc-mem -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s
Zhongxing Xu4f7759a2009-11-11 12:33:27 +00003// XFAIL: *
Ted Kremenek3fcf6282009-07-10 21:48:10 +00004
5//===----------------------------------------------------------------------===//
6// This file tests cases where we should not flag out-of-bounds warnings.
7//===----------------------------------------------------------------------===//
Ted Kremenek238d0b62009-05-04 14:31:19 +00008
Ted Kremenek758fda42009-05-04 07:04:36 +00009void f() {
10 long x = 0;
11 char *y = (char*) &x;
12 char c = y[0] + y[1] + y[2]; // no-warning
13}