Files
clang-p2996/clang/test/CodeGen/union.c
Seo Sanghyeon 828429fea9 Fix isStructureType and isUnionType to ignore typedefs, as stated
in the header. Patch by Cédric Venet.

llvm-svn: 44519
2007-12-02 16:57:27 +00:00

25 lines
280 B
C

// RUN: clang %s -emit-llvm
union {
int a;
float b;
} u;
void f() {
u.b = 11;
}
int f2( float __x ) {
union{
float __f;
unsigned int __u;
}__u;
return (int)(__u.__u >> 31);
}
typedef union { int i; int *j; } value;
int f3(value v) {
return *v.j;
}