mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 08:34:59 +00:00
Split the expression tests out of statements.c into expressions.c
llvm-svn: 38882
This commit is contained in:
parent
89d53752f5
commit
e66218bf49
21
clang/test/Parser/expressions.c
Normal file
21
clang/test/Parser/expressions.c
Normal 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;
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user