no-outofbounds.c revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// 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 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