diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-18 19:08:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-18 19:08:43 +0000 |
commit | 5d34fd3674ce28b6518b5928c91e9202adcd524e (patch) | |
tree | c2574b4034d79b864d5d423679950113b8a2442e /clang/lib/Parse/ParseObjc.cpp | |
parent | ea950e249fbcf94b795c21326d931f41405bf5e1 (diff) | |
download | bcm5719-llvm-5d34fd3674ce28b6518b5928c91e9202adcd524e.tar.gz bcm5719-llvm-5d34fd3674ce28b6518b5928c91e9202adcd524e.zip |
Implement code completion for Objective-C category names in @interface
and @implementation declarations.
llvm-svn: 89223
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index a60c89a0f12..e1f045bd8e2 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -143,6 +143,11 @@ Parser::DeclPtrTy Parser::ParseObjCAtInterfaceDeclaration( SourceLocation categoryLoc, rparenLoc; IdentifierInfo *categoryId = 0; + if (Tok.is(tok::code_completion)) { + Actions.CodeCompleteObjCInterfaceCategory(CurScope, nameId); + ConsumeToken(); + } + // For ObjC2, the category name is optional (not an error). if (Tok.is(tok::identifier)) { categoryId = Tok.getIdentifierInfo(); @@ -1111,6 +1116,11 @@ Parser::DeclPtrTy Parser::ParseObjCAtImplementationDeclaration( SourceLocation categoryLoc, rparenLoc; IdentifierInfo *categoryId = 0; + if (Tok.is(tok::code_completion)) { + Actions.CodeCompleteObjCImplementationCategory(CurScope, nameId); + ConsumeToken(); + } + if (Tok.is(tok::identifier)) { categoryId = Tok.getIdentifierInfo(); categoryLoc = ConsumeToken(); |