blob: 67ea6b5ac8e4228cba0e9796bd3b766bf620f457 [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s
Ted Kremenek2f089912009-07-10 21:48:10 +00002// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
Zhongxing Xu58e689f2009-11-11 12:33:27 +00003// XFAIL: *
Ted Kremenek2f089912009-07-10 21:48:10 +00004
5//===----------------------------------------------------------------------===//
6// This file tests cases where we should not flag out-of-bounds warnings.
7//===----------------------------------------------------------------------===//
Ted Kremenek0b9ad892009-05-04 14:31:19 +00008
Ted Kremenek20bd7462009-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}