Simplify check per Eli's comment

llvm-svn: 151412
This commit is contained in:
Douglas Gregor 2012-02-25 00:06:47 +00:00
parent f8ab049f17
commit 78e72f08ec
1 changed files with 1 additions and 4 deletions

View File

@ -201,11 +201,8 @@ bool CodeGenTypes::isFuncTypeArgumentConvertible(QualType Ty) {
// convert it. Note that getDefinition()==0 is not the same as !isDefinition.
// The exception is an enumeration type with a fixed underlying type; these
// can be converted even if they are forward declarations.
if (TT->getDecl()->getDefinition() == 0 &&
!(isa<EnumDecl>(TT->getDecl()) &&
cast<EnumDecl>(TT->getDecl())->isFixed())) {
if (TT->isIncompleteType())
return false;
}
// If this is an enum, then it is always safe to convert.
const RecordType *RT = dyn_cast<RecordType>(TT);