File tree 1 file changed +1
-16
lines changed 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -321,22 +321,7 @@ bool CIRGenTypes::isFuncParamTypeConvertible(clang::QualType Ty) {
321
321
return true ;
322
322
323
323
// Incomplete types cannot be converted.
324
- if (TT->isIncompleteType ())
325
- return false ;
326
-
327
- // If this is an enum, then it is always safe to convert.
328
- const RecordType *RT = dyn_cast<RecordType>(TT);
329
- if (!RT)
330
- return true ;
331
-
332
- // Otherwise, we have to be careful. If it is a struct that we're in the
333
- // process of expanding, then we can't convert the function type. That's ok
334
- // though because we must be in a pointer context under the struct, so we can
335
- // just convert it to a dummy type.
336
- //
337
- // We decide this by checking whether ConvertRecordDeclType returns us an
338
- // opaque type for a struct that we know is defined.
339
- return isSafeToConvert (RT->getDecl (), *this );
324
+ return !TT->isIncompleteType ();
340
325
}
341
326
342
327
// / Code to verify a given function type is complete, i.e. the return type and
You can’t perform that action at this time.
0 commit comments