diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2016-12-08 15:09:40 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2016-12-08 15:09:40 +0000 |
| commit | feafdf6be48da5819d1a03f672d9afdbf526025d (patch) | |
| tree | 78d7592a272233d7d03c2533f3a21b21115dc4f3 /clang/lib/Parse/ParseExpr.cpp | |
| parent | 66c8fa94a6de0d6b95746d84e74cc884b39ec279 (diff) | |
| download | bcm5719-llvm-feafdf6be48da5819d1a03f672d9afdbf526025d.tar.gz bcm5719-llvm-feafdf6be48da5819d1a03f672d9afdbf526025d.zip | |
[CodeCompletion] Provide Objective-C class property completion results
This commit provides class property code completion results. It supports
explicit and implicit class properties, but the special block completion is done
only for explicit properties right now.
rdar://25636195
Differential Revision: https://reviews.llvm.org/D27053
llvm-svn: 289058
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 8 |
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))) { |

