diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-02-25 00:06:47 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-02-25 00:06:47 +0000 |
| commit | 78e72f08ec5dc6279e1461e9386e2cad17f018e7 (patch) | |
| tree | 167edf51dddda4a3cf585de2112cc04cd9f08de1 /clang/lib | |
| parent | f8ab049f1717c0030ef61499bb4d087532efdac0 (diff) | |
| download | bcm5719-llvm-78e72f08ec5dc6279e1461e9386e2cad17f018e7.tar.gz bcm5719-llvm-78e72f08ec5dc6279e1461e9386e2cad17f018e7.zip | |
Simplify check per Eli's comment
llvm-svn: 151412
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index 2da6cf0f2dc..90a953b0c8a 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/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); |

