in the header. Patch by Cédric Venet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44519
91177308-0d34-0410-b5e6-
96231b3b80d8
}
bool Type::isStructureType() const {
- if (const RecordType *RT = dyn_cast<RecordType>(this))
+ if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType))
if (RT->getDecl()->getKind() == Decl::Struct)
return true;
return false;
}
bool Type::isUnionType() const {
- if (const RecordType *RT = dyn_cast<RecordType>(this))
+ if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType))
if (RT->getDecl()->getKind() == Decl::Union)
return true;
return false;
}__u;
return (int)(__u.__u >> 31);
}
+
+typedef union { int i; int *j; } value;
+
+int f3(value v) {
+ return *v.j;
+}