diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-27 18:18:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-27 18:18:05 +0000 |
commit | b7f5a9c5cd441eed417d3f1924ddcf538589e65e (patch) | |
tree | 71b8e3170313db274d513b1f460bf7784fd2bc2c /clang/lib/Sema | |
parent | a245edc82ff2f3ae9cd28a77502aa293f1c65ebf (diff) | |
download | bcm5719-llvm-b7f5a9c5cd441eed417d3f1924ddcf538589e65e.tar.gz bcm5719-llvm-b7f5a9c5cd441eed417d3f1924ddcf538589e65e.zip |
Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.
llvm-svn: 159280
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index bc77e6fae7e..2a7a8b9f195 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -10854,8 +10854,9 @@ static void MarkExprReferenced(Sema &SemaRef, SourceLocation Loc, if (!MD) return; const Expr *Base = ME->getBase(); - const CXXRecordDecl *MostDerivedClassDecl - = Base->getMostDerivedClassDeclForType(); + if (Base->getType()->isDependentType()) + return; + const CXXRecordDecl *MostDerivedClassDecl = Base->getBestDynamicClassType(); if (!MostDerivedClassDecl) return; CXXMethodDecl *DM = MD->getCorrespondingMethodInClass(MostDerivedClassDecl); |