summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index b9988bb046e..4b0a83446e5 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -885,7 +885,13 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
// Allow the base to be 'super' if in an objc-method.
(&II == Ident_super && getCurScope()->isInObjcMethodScope()))) {
ConsumeToken();
-
+
+ if (Tok.is(tok::code_completion) && &II != Ident_super) {
+ Actions.CodeCompleteObjCClassPropertyRefExpr(
+ getCurScope(), II, ILoc, ExprStatementTokLoc == ILoc);
+ cutOffParsing();
+ return ExprError();
+ }
// Allow either an identifier or the keyword 'class' (in C++).
if (Tok.isNot(tok::identifier) &&
!(getLangOpts().CPlusPlus && Tok.is(tok::kw_class))) {
OpenPOWER on IntegriCloud