blob: 9ddb7979ca69edfe2ad85485819a99b93f1e409e [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 &&
Mike Stump0979d802009-07-22 22:56:04 +00003// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
Mike Stump0979d802009-07-22 22:56:04 +00004// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s &&
5// 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}