diff options
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 22d15be6a8..15cf6602b7 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -33,7 +33,7 @@ #include <cstring> using namespace clang; -const CXXRecordDecl *Expr::getMostDerivedClassDeclForType() const { +const CXXRecordDecl *Expr::getBestDynamicClassType() const { const Expr *E = this; while (true) { @@ -51,15 +51,10 @@ const CXXRecordDecl *Expr::getMostDerivedClassDeclForType() const { } QualType DerivedType = E->getType(); - if (DerivedType->isDependentType()) - return NULL; if (const PointerType *PTy = DerivedType->getAs<PointerType>()) DerivedType = PTy->getPointeeType(); const RecordType *Ty = DerivedType->castAs<RecordType>(); - if (!Ty) - return NULL; - Decl *D = Ty->getDecl(); return cast<CXXRecordDecl>(D); } |