summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 22d15be6a87..15cf6602b71 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud