2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s
|
|
|
|
// RUN: %clang_cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s
|
2009-11-11 20:33:27 +08:00
|
|
|
// XFAIL: *
|
2009-07-11 05:48:10 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// This file tests cases where we should not flag out-of-bounds warnings.
|
|
|
|
//===----------------------------------------------------------------------===//
|
2009-05-04 22:31:19 +08:00
|
|
|
|
2009-05-04 03:24:34 +08:00
|
|
|
void f() {
|
|
|
|
long x = 0;
|
|
|
|
char *y = (char*) &x;
|
|
|
|
char c = y[0] + y[1] + y[2]; // no-warning
|
|
|
|
}
|