Split the expression tests out of statements.c into expressions.c

llvm-svn: 38882
This commit is contained in:
Chris Lattner 2006-08-12 17:19:28 +00:00
parent 89d53752f5
commit e66218bf49
2 changed files with 21 additions and 19 deletions

View File

@ -0,0 +1,21 @@
// RUN: clang -fsyntax-only %s
void test1() {
if (sizeof (int){ 1}); // sizeof compound literal
if (sizeof (int)); // sizeof type
(int)4; // cast.
(int){4}; // compound literal.
// FIXME: change this to the struct version when we can.
//int A = (struct{ int a;}){ 1}.a;
int A = (int){ 1}.a;
}
int test2(int a, int b) {
return a ? a,b : a;
}
int test3(int a, int b) {
return a = b = c;
}

View File

@ -47,22 +47,3 @@ void test5() {
if (0);
}
void test6() {
if (sizeof (int){ 1}); // sizeof compound literal
if (sizeof (int)); // sizeof type
(int)4; // cast.
(int){4}; // compound literal.
// FIXME: change this to the struct version when we can.
//int A = (struct{ int a;}){ 1}.a;
int A = (int){ 1}.a;
}
int test7(int a, int b) {
return a ? a,b : a;
}
int test8(int a, int b) {
return a = b = c;
}