summaryrefslogtreecommitdiffstats
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
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 e7b6c6ff90..ee06c76f60 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();