summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-22 16:52:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-22 16:52:41 +0000
commit5df539a1004bc4db5c38b33ba3e219595a10ae3c (patch)
tree8f7162c2eeb96f9bef560b568c3a039187a31953 /lib/Parse/ParseExpr.cpp
parentd2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (diff)
Notes
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index e7b6c6ff90b3..ee06c76f6024 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1652,9 +1652,10 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
if (Tok.is(tok::code_completion)) {
// Code completion for a member access expression.
- Actions.CodeCompleteMemberReferenceExpr(
- getCurScope(), LHS.get(), OpLoc, OpKind == tok::arrow,
- ExprStatementTokLoc == LHS.get()->getLocStart());
+ if (Expr *Base = LHS.get())
+ Actions.CodeCompleteMemberReferenceExpr(
+ getCurScope(), Base, OpLoc, OpKind == tok::arrow,
+ ExprStatementTokLoc == Base->getLocStart());
cutOffParsing();
return ExprError();