blob: 7aeae7e11d1e61372e3fcc6f027aca78d4aa268c [file] [log] [blame]
Ted Kremenekeea8c292009-07-06 21:58:46 +00001// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s &&
Ted Kremenek3fcf6282009-07-10 21:48:10 +00002// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic-old-cast -verify %s &&
3// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
4
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}