blob: bb8f65e1e96dc7711cde34aaa81e42e96b5781a6 [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
3
4//===----------------------------------------------------------------------===//
5// This file tests cases where we should not flag out-of-bounds warnings.
6//===----------------------------------------------------------------------===//
Ted Kremenek0b9ad892009-05-04 14:31:19 +00007
Ted Kremenek20bd7462009-05-04 07:04:36 +00008void f() {
9 long x = 0;
10 char *y = (char*) &x;
11 char c = y[0] + y[1] + y[2]; // no-warning
12}