diff options
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index f2f77367d8..47b5625b92 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -40,6 +40,9 @@ const CXXRecordDecl *Expr::getBestDynamicClassType() const { if (const PointerType *PTy = DerivedType->getAs<PointerType>()) DerivedType = PTy->getPointeeType(); + if (DerivedType->isDependentType()) + return NULL; + const RecordType *Ty = DerivedType->castAs<RecordType>(); Decl *D = Ty->getDecl(); return cast<CXXRecordDecl>(D); |