Ted Kremenek | a8180e5 | 2012-01-20 06:00:17 +0000 | [diff] [blame] | 1 | // RUN: %clang --analyze %s -o %t |
2 | |||||
3 | // Tests that some specific checkers are enabled by default. | ||||
4 | |||||
5 | id foo(int x) { | ||||
6 | id title; | ||||
7 | switch (x) { | ||||
8 | case 1: | ||||
9 | title = @"foo"; // expected-warning {{never read}} | ||||
10 | case 2: | ||||
11 | title = @"bar"; | ||||
12 | break; | ||||
13 | default: | ||||
14 | title = "@baz"; | ||||
15 | break; | ||||
16 | } | ||||
17 | return title; | ||||
18 | } | ||||
19 | |||||
20 |