blob: ec7aebbc5bbc1bedce05fd229826910011d72bd0 [file] [log] [blame]
Mike Stump0979d802009-07-22 22:56:04 +00001// RUN: clang-cc -analyze -warn-dead-stores -verify %s &&
2// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s &&
3// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -analyzer-constraints=basic -warn-dead-stores -verify %s &&
4// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
5// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -analyzer-constraints=range -warn-dead-stores -verify %s &&
6// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s &&
7// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s
8
9int j;
10void f1() {
11 int x = 4;
12
13 ++x; // expected-warning{{never read}}
14
15 switch (j) {
16 case 1:
17 throw 1;
18 (void)x;
19 break;
20 }
21}