Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s |
Ted Kremenek | 2f08991 | 2009-07-10 21:48:10 +0000 | [diff] [blame] | 2 | // RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s |
| 3 | |
| 4 | //===----------------------------------------------------------------------===// |
| 5 | // This file tests cases where we should not flag out-of-bounds warnings. |
| 6 | //===----------------------------------------------------------------------===// |
Ted Kremenek | 0b9ad89 | 2009-05-04 14:31:19 +0000 | [diff] [blame] | 7 | |
Ted Kremenek | 20bd746 | 2009-05-04 07:04:36 +0000 | [diff] [blame] | 8 | void f() { |
| 9 | long x = 0; |
| 10 | char *y = (char*) &x; |
| 11 | char c = y[0] + y[1] + y[2]; // no-warning |
| 12 | } |