diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-16 15:14:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-16 15:14:18 +0000 |
commit | c7b6d883360092808b0ae81b7829fa8196ef42a1 (patch) | |
tree | 756aa0a683153173db1f5915b12e407741e24fd0 /lib/Parse/ParseDecl.cpp | |
parent | 7c432dd959609a3689c2e4406450c092e6d76d6d (diff) |
Implement code completion for Objective-C class message sends that are
missing the opening bracket '[', e.g.,
NSArray <CC>
at function scope. Previously, we would only give trivial completions
(const, volatile, etc.), because we're in a "declaration name"
scope. Now, we also provide completions for class methods of NSArray,
e.g.,
alloc
Note that we already had support for this after the first argument,
e.g.,
NSArray method:x <CC>
would get code completion for class methods of NSArray whose selector
starts with "method:". This was already present because we recover
as if NSArray method:x were a class message send missing the opening
bracket (which was committed in r114057).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index ef495e33d8..bef9f9585d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -905,8 +905,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, = DSContext == DSC_top_level || (DSContext == DSC_class && DS.isFriendSpecified()); - Actions.CodeCompleteDeclarator(getCurScope(), AllowNonIdentifiers, - AllowNestedNameSpecifiers); + Actions.CodeCompleteDeclSpec(getCurScope(), DS, + AllowNonIdentifiers, + AllowNestedNameSpecifiers); ConsumeCodeCompletionToken(); return; } |