mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 17:43:57 +00:00
5b6032ab3c
llvm-svn: 38892
31 lines
584 B
C
31 lines
584 B
C
// 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, int c) {
|
|
return a = b = c;
|
|
}
|
|
|
|
int test4() {
|
|
test4();
|
|
}
|
|
|
|
int test_offsetof() {
|
|
// FIXME: change into something that is semantically correct.
|
|
__builtin_offsetof(int, a.b.c[4][5]);
|
|
}
|