Chris Lattner | 19a1d7c | 2008-02-16 23:55:16 +0000 | [diff] [blame] | 1 | // RUN: clang < %s -emit-llvm |
Chris Lattner | 1f1ded9 | 2007-08-24 21:00:35 +0000 | [diff] [blame] | 2 | int A; |
3 | long long B; | ||||
4 | int C; | ||||
5 | int *P; | ||||
Chris Lattner | 9c62c1d | 2007-08-25 21:57:08 +0000 | [diff] [blame] | 6 | void test1() { |
Chris Lattner | 1f1ded9 | 2007-08-24 21:00:35 +0000 | [diff] [blame] | 7 | C = (A /= B); |
8 | |||||
9 | P -= 4; | ||||
10 | |||||
11 | C = P - (P+10); | ||||
12 | } | ||||
13 | |||||
Chris Lattner | 9c62c1d | 2007-08-25 21:57:08 +0000 | [diff] [blame] | 14 | short x; |
15 | void test2(char c) { x += c; } | ||||
Chris Lattner | 1f1ded9 | 2007-08-24 21:00:35 +0000 | [diff] [blame] | 16 | |
Devang Patel | f86206f | 2007-10-25 22:19:13 +0000 | [diff] [blame] | 17 | void foo(char *strbuf) { |
18 | int stufflen = 4; | ||||
19 | strbuf += stufflen; | ||||
20 | } | ||||
Chris Lattner | 19a1d7c | 2008-02-16 23:55:16 +0000 | [diff] [blame] | 21 | |
22 | |||||
23 | // Aggregate cast to void | ||||
24 | union uu { int a;}; void f(union uu p) { (void) p;} | ||||
25 |