Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -x c++ < %s |
Nuno Lopes | 32f6209 | 2009-01-11 23:22:37 +0000 | [diff] [blame] | 2 | |
Chris Lattner | 7804bcb | 2009-10-17 04:24:20 +0000 | [diff] [blame] | 3 | void test0(int x) { |
Nuno Lopes | 32f6209 | 2009-01-11 23:22:37 +0000 | [diff] [blame] | 4 | if (x != 0) return; |
5 | } | ||||
Chris Lattner | 7804bcb | 2009-10-17 04:24:20 +0000 | [diff] [blame] | 6 | |
7 | |||||
8 | // PR5211 | ||||
9 | void test1() { | ||||
10 | char *xpto; | ||||
11 | while ( true && xpto[0] ); | ||||
12 | } | ||||
Chris Lattner | 197a338 | 2010-01-09 21:44:40 +0000 | [diff] [blame] | 13 | |
14 | // PR5514 | ||||
15 | int a; | ||||
16 | void test2() { ++a+=10; } | ||||
Chris Lattner | 5c12c7b | 2010-08-17 23:58:10 +0000 | [diff] [blame] | 17 | |
18 | // PR7892 | ||||
19 | int test3(const char*); | ||||
20 | int test3g = test3(__PRETTY_FUNCTION__); | ||||
Chris Lattner | d7241c7 | 2010-08-18 00:08:27 +0000 | [diff] [blame] | 21 | |
22 | |||||
23 | // PR7889 | ||||
24 | struct test4A { | ||||
25 | int j : 2; | ||||
26 | }; | ||||
27 | int test4() { | ||||
28 | test4A a; | ||||
29 | (a.j = 2) = 3; | ||||
30 | } |