Mike Stump | 0979d80 | 2009-07-22 22:56:04 +0000 | [diff] [blame^] | 1 | // 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 | |
| 9 | int j; |
| 10 | void 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 | } |