blob: 8aa194d31b87408b96e61b6301622ddb1931e3c8 [file] [log] [blame]
Zhongxing Xuef74f4c2009-12-14 06:34:20 +00001// RUN: clang -cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s
2// RUN: clang -cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s
Zhongxing Xu58e689f2009-11-11 12:33:27 +00003// XFAIL: *
Ted Kremenek2f089912009-07-10 21:48:10 +00004
5//===----------------------------------------------------------------------===//
6// This file tests cases where we should not flag out-of-bounds warnings.
7//===----------------------------------------------------------------------===//
Ted Kremenek0b9ad892009-05-04 14:31:19 +00008
Ted Kremenek20bd7462009-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}