if (UD->hasAttr<TransparentUnionAttr>()) {
for (RecordDecl::field_iterator it = UD->field_begin(),
itend = UD->field_end(); it != itend; ++it) {
- QualType ET = it->getType();
+ QualType ET = getCanonicalParamType(it->getType());
QualType MT = mergeTypes(ET, SubType, OfBlockPointer, Unqualified);
if (!MT.isNull())
return MT;
typedef union {
int *ip;
float *fp;
+ long *__restrict rlp;
} TU __attribute__((transparent_union));
void f(TU); // expected-note{{passing argument to parameter here}}
void ffp(TU);
void ffp(float *f) {}
+void flp(TU);
+void flp(long *l) {}
+
void fvp(TU); // expected-note{{previous declaration is here}}
void fvp(void *p) {} // expected-error{{conflicting types}}