blob: fa5b639b7d67d864f28281c4d198fb89163b88e0 [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +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 -analyzer-constraints=range -warn-dead-stores -verify %s
4// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s
Mike Stump0979d802009-07-22 22:56:04 +00005// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s
6
7int j;
8void f1() {
9 int x = 4;
10
11 ++x; // expected-warning{{never read}}
12
13 switch (j) {
14 case 1:
15 throw 1;
16 (void)x;
17 break;
18 }
19}