no-outofbounds.c revision 58e689fead1490611bcd114fb707bfc08a12049e
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// XFAIL: * 4 5//===----------------------------------------------------------------------===// 6// This file tests cases where we should not flag out-of-bounds warnings. 7//===----------------------------------------------------------------------===// 8 9void f() { 10 long x = 0; 11 char *y = (char*) &x; 12 char c = y[0] + y[1] + y[2]; // no-warning 13} 14