summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/complete-method-decls.m
Commit message (Collapse)AuthorAgeFilesLines
* [code completion] Complete ObjC methods in @implementation without leadingAlex Lorenz2017-10-241-0/+22
| | | | | | | | '-'/'+' prefix rdar://12040840 llvm-svn: 316458
* Implement filtering for code completion of identifiers.Vassil Vassilev2016-07-271-1/+1
| | | | | | | | Patch by Cristina Cristescu and Axel Naumann! Agreed on post commit review (D17820). llvm-svn: 276878
* [test] Follow-up for r243119, also add a test case using property methods.Argyrios Kyrtzidis2015-07-281-2/+8
| | | | llvm-svn: 243455
* [test] Attempt to fix failing test in non-darwin bots.Argyrios Kyrtzidis2015-07-241-2/+2
| | | | llvm-svn: 243120
* [code-completion] Strip outer nullability annotations when completing method ↵Argyrios Kyrtzidis2015-07-241-5/+7
| | | | | | | | | | | | implementations. The outer nullability is transferred from the declaration to the implementation so including them is redundant. The inner ones are not transferred so they are kept to match the exact types. When we transfer the inner ones as well adding them in the implementation will become redundant and we should strip those as well. rdar://21737451 llvm-svn: 243119
* [libclang] When inferring nonnull use the contextual keyword for the ↵Douglas Gregor2015-07-071-1/+16
| | | | | | | | | | code-completion results, when appropriate. rdar://20742295 llvm-svn: 241560
* Handle Objective-C type arguments.Douglas Gregor2015-07-071-2/+1
| | | | | | | | | | | | | | | | | | | | | Objective-C type arguments can be provided in angle brackets following an Objective-C interface type. Syntactically, this is the same position as one would provide protocol qualifiers (e.g., id<NSCopying>), so parse both together and let Sema sort out the ambiguous cases. This applies both when parsing types and when parsing the superclass of an Objective-C class, which can now be a specialized type (e.g., NSMutableArray<T> inherits from NSArray<T>). Check Objective-C type arguments against the type parameters of the corresponding class. Verify the length of the type argument list and that each type argument satisfies the corresponding bound. Specializations of parameterized Objective-C classes are represented in the type system as distinct types. Both specialized types (e.g., NSArray<NSString *> *) and unspecialized types (NSArray *) are represented, separately. llvm-svn: 241542
* Code completion for nullability type specifiers.Douglas Gregor2015-06-191-0/+13
| | | | | | Another part of rdar://problem/18868820. llvm-svn: 240159
* [code-completion] Add a couple of test cases suggested by Jordan, and a FIXME.Argyrios Kyrtzidis2014-03-051-1/+9
| | | | llvm-svn: 202995
* [AST] A "Class<P>" type should not have '*' when printed out.Argyrios Kyrtzidis2014-03-051-0/+11
| | | | | | rdar://14309030 llvm-svn: 202941
* [libclang] Remove the ParentKind cursor kind from code-completion results.Argyrios Kyrtzidis2012-09-261-8/+8
| | | | | | This is to reduce dependency to cursors for the code-completion results. llvm-svn: 164705
* When code completion walks the members of a protocol or interface,Douglas Gregor2012-06-121-1/+1
| | | | | | make sure that we walk the definition. Fixes <rdar://problem/11427742>. llvm-svn: 158357
* Include the Objective-C parameter- and return-passing qualifiers whenDouglas Gregor2012-04-101-8/+16
| | | | | | | providing code completions for Objective-C method declarations. Fixes <rdar://problem/11164498>. llvm-svn: 154421
* Introduce a new libclang API to determine the parent context of a codeDouglas Gregor2012-03-271-7/+7
| | | | | | | | | completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. llvm-svn: 153545
* Selector::getIdentifierInfoForSlot() can return NULL values, a factDouglas Gregor2011-02-181-0/+11
| | | | | | | | | | | | that was ignored in a few places (most notably, code completion). Introduce Selector::getNameForSlot() for the common case where we only care about the name. Audit all uses of getIdentifierInfoForSlot(), switching many over to getNameForSlot(), fixing a few crashers. Fixed <rdar://problem/8939352>, a code-completion crasher. llvm-svn: 125977
* Implement a special code-completion pattern for "IBAction". FixesDouglas Gregor2011-02-151-1/+6
| | | | | | <rdar://problem/8767704>. llvm-svn: 125604
* Tweak code-completion result priorities, so that exact and similarDouglas Gregor2010-10-191-38/+38
| | | | | | | | | type matches have a bigger impact. The impetus for this change was that, when initializing an enumeration value, we want enumerators of that enumeration type to have a higher priority than, e.g., unrelated local variables. llvm-svn: 116774
* Introduce code completion results for Objective-C methods, both whenDouglas Gregor2010-10-181-23/+22
| | | | | | | | | declaring methods and when sending messages to them, by bringing all of the selector into TypedCheck chunks in the completion result. This way, we can improve the sorting of these results to account for the full selector name rather than just the first chunk. llvm-svn: 116746
* When providing code completions of Objective-C method declarationsDouglas Gregor2010-10-181-1/+3
| | | | | | | (after - or +), always traverse superclasses and all categories. The programmer may want to complete a method from *anywhere*. llvm-svn: 116723
* Switch c-index-test from clang_codeComplete() over toDouglas Gregor2010-10-111-7/+7
| | | | | | | | | | clang_codeCompleteAt(). This uncovered a few issues with the latter: - ASTUnit wasn't saving/restoring diagnostic state appropriately between reparses and code completions. - "Overload" completions weren't being passed through to the client llvm-svn: 116241
* Code completion has no reason to prefer values over types, especiallyDouglas Gregor2010-09-201-15/+15
| | | | | | | | at the statement level or in Objective-C message receivers. Therefore, just give types and declarations the same basic priority, and adjust from there. llvm-svn: 114374
* Swap the priorities of constants and types, so that we prefer types.Douglas Gregor2010-09-161-15/+15
| | | | llvm-svn: 114086
* Revert "Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-2/+2
| | | | | | | into the clients", because the C standard library sucks. Where's my stable sort, huh? llvm-svn: 112121
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-251-2/+2
| | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. llvm-svn: 112095
* When performing completions involving Objective-C method declarationsDouglas Gregor2010-08-251-2/+2
| | | | | | | (e.g., for message sends or method declaration/definition completions), adjust methods that come from a base class. llvm-svn: 112013
* In code-completion contexts where both types and other values areDouglas Gregor2010-08-241-15/+15
| | | | | | | | | present, prefer values to types, since it's more common to compute with values than it is to declare new entities or perform type casts. So, tweak the ranking of types vs. other declarations and constants accordingly. llvm-svn: 111998
* Provide code completion results for the context-sensitive Objective-CDouglas Gregor2010-08-241-1/+42
| | | | | | keywords "in", "out", "inout", "byref", "bycopy", and "oneway". llvm-svn: 111884
* When generating code completion patterns for method declarations, giveDouglas Gregor2010-08-171-30/+30
| | | | | | | the resulting pattern the appropriate cursor kind of an instance or class method declaration. llvm-svn: 111237
* 1 != I. Fix the formulation of code-completion patterns forDouglas Gregor2010-08-171-2/+17
| | | | | | Objective-C method declarations with > 2 parameters. llvm-svn: 111233
* Support code completion for parameter names in Objective-C methodDouglas Gregor2010-07-081-5/+11
| | | | | | declarations. llvm-svn: 107933
* Introduce a new code-completion point prior to an identifier in theDouglas Gregor2010-07-081-0/+15
| | | | | | | | | | | | selector of an Objective-C method declaration, e.g., given - (int)first:(int)x second:(int)y; this code completion point triggers at the location of "second". It will provide completions that fill out the method declaration for any known method, anywhere in the translation unit. llvm-svn: 107929
* Don't put method bodies into code completions unless code patterns areDouglas Gregor2010-05-281-5/+5
| | | | | | turned on. llvm-svn: 104909
* Implement code completion for Objective-C method declarations andDouglas Gregor2010-04-071-0/+82
definitions, e.g., after - or - (id) we'll find all of the "likely" instance methods that one would want to declare or define at this point. In the latter case, we only produce results whose return types match "id". llvm-svn: 100587
OpenPOWER on IntegriCloud