Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s |
| 2 | // RUN: clang-cc -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s |
Zhongxing Xu | 58e689f | 2009-11-11 12:33:27 +0000 | [diff] [blame] | 3 | // XFAIL: * |
Ted Kremenek | 2f08991 | 2009-07-10 21:48:10 +0000 | [diff] [blame] | 4 | |
| 5 | //===----------------------------------------------------------------------===// |
| 6 | // This file tests cases where we should not flag out-of-bounds warnings. |
| 7 | //===----------------------------------------------------------------------===// |
Ted Kremenek | 0b9ad89 | 2009-05-04 14:31:19 +0000 | [diff] [blame] | 8 | |
Ted Kremenek | 20bd746 | 2009-05-04 07:04:36 +0000 | [diff] [blame] | 9 | void f() { |
| 10 | long x = 0; |
| 11 | char *y = (char*) &x; |
| 12 | char c = y[0] + y[1] + y[2]; // no-warning |
| 13 | } |