diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-04-07 05:55:38 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-04-07 05:55:38 +0000 |
| commit | 7bbd3d75efd9193762e14ea7bde87c91668e2eae (patch) | |
| tree | ffdabfeb1a36d0aea09772894d87a4b0af41ea07 /clang/lib/AST/ASTContext.cpp | |
| parent | 90bef90ad40d2e4e82e1762a1e947a5578c1208e (diff) | |
| download | bcm5719-llvm-7bbd3d75efd9193762e14ea7bde87c91668e2eae.tar.gz bcm5719-llvm-7bbd3d75efd9193762e14ea7bde87c91668e2eae.zip | |
Remove a dead check for compatible builtin types
llvm-svn: 49319
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index c7d93404015..355308a40ca 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1435,13 +1435,6 @@ void ASTContext::setObjCConstantStringInterface(ObjCInterfaceDecl *Decl) { ObjCConstantStringType = getObjCInterfaceType(Decl); } -bool ASTContext::builtinTypesAreCompatible(QualType lhs, QualType rhs) { - const BuiltinType *lBuiltin = lhs->getAsBuiltinType(); - const BuiltinType *rBuiltin = rhs->getAsBuiltinType(); - - return lBuiltin->getKind() == rBuiltin->getKind(); -} - /// areCompatObjCInterfaces - This routine is called when we are testing /// compatibility of two different [potentially qualified] ObjCInterfaceType's. static bool areCompatObjCInterfaces(const ObjCInterfaceType *LHS, @@ -1704,13 +1697,14 @@ bool ASTContext::typesAreCompatible(QualType LHS_NC, QualType RHS_NC) { case Type::Tagged: // handle structures, unions return tagTypesAreCompatible(LHS, RHS); case Type::Builtin: - return builtinTypesAreCompatible(LHS, RHS); + // Only exactly equal builtin types are compatible, which is tested above. + return false; + case Type::Vector: + return areCompatVectorTypes(cast<VectorType>(LHS), cast<VectorType>(RHS)); case Type::ObjCInterface: // The LHS must be a superclass of the RHS. return cast<ObjCInterfaceType>(LHS)->getDecl()->isSuperClassOf( cast<ObjCInterfaceType>(RHS)->getDecl()); - case Type::Vector: - return areCompatVectorTypes(cast<VectorType>(LHS), cast<VectorType>(RHS)); case Type::ObjCQualifiedInterface: return areCompatObjCQualInterfaces(cast<ObjCQualifiedInterfaceType>(LHS), cast<ObjCQualifiedInterfaceType>(RHS)); |

