no-outofbounds.c revision f7a0cf426eddae76e1a71dd2295631a2cf0560af
1// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s &&
2// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
3
4//===----------------------------------------------------------------------===//
5// This file tests cases where we should not flag out-of-bounds warnings.
6//===----------------------------------------------------------------------===//
7
8void f() {
9  long x = 0;
10  char *y = (char*) &x;
11  char c = y[0] + y[1] + y[2]; // no-warning
12}
13