blob: 13e34099c894b2bde10538c42f25681fd9fd8b7c [file] [log] [blame]
Chris Lattnere66218b2006-08-12 17:19:28 +00001// RUN: clang -fsyntax-only %s
2
3void test1() {
4 if (sizeof (int){ 1}); // sizeof compound literal
5 if (sizeof (int)); // sizeof type
6
7 (int)4; // cast.
8 (int){4}; // compound literal.
9
10 // FIXME: change this to the struct version when we can.
11 //int A = (struct{ int a;}){ 1}.a;
12 int A = (int){ 1}.a;
13}
14
15int test2(int a, int b) {
16 return a ? a,b : a;
17}
18
Chris Lattner2c5c4212006-08-12 18:11:24 +000019int test3(int a, int b, int c) {
Chris Lattnere66218b2006-08-12 17:19:28 +000020 return a = b = c;
21}
Chris Lattner2c5c4212006-08-12 18:11:24 +000022
23int test4() {
24 test4();
25}