aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-25 00:06:47 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-25 00:06:47 +0000
commit4a59bc26b3f2d00055e24332c3164c894fafac27 (patch)
tree677e9526c81594fafc00b829528baec67993b58f /lib/CodeGen/CodeGenTypes.cpp
parent9b42afdccc9f4b32ed4f83492f87e2cd0518f9f3 (diff)
Simplify check per Eli's comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 2da6cf0f2d..90a953b0c8 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -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);