aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-06-27 17:44:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-06-27 17:44:39 +0000
commit0713d993cd0b4eb6a1b642c7d51d0f1845c1e986 (patch)
treeac660576bbaacd51c15639b38dece5a8b64c87fc /lib/Sema/SemaExpr.cpp
parent962668d2c192dd02f75b8ec3628a89964bfb738b (diff)
Fix a crash I introduced in r159212.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 4dd6f0b552..bc77e6fae7 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -10859,6 +10859,8 @@ static void MarkExprReferenced(Sema &SemaRef, SourceLocation Loc,
if (!MostDerivedClassDecl)
return;
CXXMethodDecl *DM = MD->getCorrespondingMethodInClass(MostDerivedClassDecl);
+ if (!DM)
+ return;
SemaRef.MarkAnyDeclReferenced(Loc, DM);
}