diff options
author | Steve Naroff <snaroff@apple.com> | 2009-11-07 02:08:14 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-11-07 02:08:14 +0000 |
commit | c4df6d2c05c647a6a5770ba0c749782b6c023a3a (patch) | |
tree | bfbd5de6fd0b749e414c632f0cf0131a95214307 /lib/Parse/ParseObjc.cpp | |
parent | ba578cb7b25357c479b2b5530546a9f153a525c0 (diff) |
Add basic code completion support for ObjC messages.
Still a work in progress...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 71aeb30927..d06d8b6e9c 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1549,6 +1549,13 @@ Parser::ParseObjCMessageExpressionBody(SourceLocation LBracLoc, SourceLocation NameLoc, IdentifierInfo *ReceiverName, ExprArg ReceiverExpr) { + if (Tok.is(tok::code_completion)) { + if (ReceiverName) + Actions.CodeCompleteObjCFactoryMethod(CurScope, ReceiverName); + else + Actions.CodeCompleteObjCInstanceMethod(CurScope, ReceiverExpr.release()); + ConsumeToken(); + } // Parse objc-selector SourceLocation Loc; IdentifierInfo *selIdent = ParseObjCSelectorPiece(Loc); |