summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion
Commit message (Collapse)AuthorAgeFilesLines
* [Preprocessor] Iterating over all macros should include those from modules.Jordan Rose2015-06-242-0/+21
| | | | | | | | | | | | So, iterate over the list of macros mentioned in modules, and make sure those are in the master table. This isn't particularly efficient, but hopefully it's something that isn't done too often. PR23929 and rdar://problem/21480635 llvm-svn: 240571
* When completing Objective-C instance method invocations, perform a ↵Anders Carlsson2014-02-281-0/+46
| | | | | | contextual conversion to an Objective-C pointer type of the target expression if needed. This fixes code completion of method invocations where the target is a smart pointer that has an explicit conversion operator to an Objective-C type. llvm-svn: 202529
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-1219-26/+26
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* PR14381: Never skip constexpr function bodies when code-completing. We may needRichard Smith2012-11-191-0/+13
| | | | | | them in order to parse the rest of the file. llvm-svn: 168327
* [libclang] Remove the ParentKind cursor kind from code-completion results.Argyrios Kyrtzidis2012-09-261-1/+1
| | | | | | This is to reduce dependency to cursors for the code-completion results. llvm-svn: 164705
* Macro history (de-)serialization. Deserialization currently reads only the ↵Alexander Kornienko2012-09-252-0/+19
| | | | | | | | | | | | | | | | latest macro definition. Needs more work. Summary: Passes all tests (+ the new one with code completion), but needs a thorough review in part related to modules. Reviewers: doug.gregor Reviewed By: alexfh CC: cfe-commits, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D41 llvm-svn: 164610
* Make the spacing of the code completion result for NSDictionaryDouglas Gregor2012-08-171-1/+1
| | | | | | | literals match the spacing introduced by the ObjC modernizer. Fixes the rest of <rdar://problem/11889572>. llvm-svn: 162084
* Fix an assertion failure when code completing an auto variable's initialiser.Peter Collingbourne2012-07-271-0/+2
| | | | llvm-svn: 160857
* Remove unnecessary spacing around Objective-C object literal codeDouglas Gregor2012-07-171-3/+3
| | | | | | completions. Fixes <rdar://problem/11889572>. llvm-svn: 160407
* Add a new libclang completion API to get brief documentation comment that isDmitri Gribenko2012-07-021-0/+33
| | | | | | | | | | | | | | | | attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). llvm-svn: 159539
* [completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.Jordan Rose2012-06-151-0/+17
| | | | | | | | | | | | | Specifically, @[] and @{} didn't have a type associated with them; we now use "NSArray *" and "NSDictionary *", respectively. @"" has the type "NSString *". @(), unfortunately, has type "id", since it (currently) may be either an NSNumber or an NSString. Add a test for all the Objective-C at-expression completions. <rdar://problem/11507708&11507668&11507711> llvm-svn: 158533
* Add 'env' in hopes of making this test pass on Windows.Nick Lewycky2012-04-161-1/+1
| | | | llvm-svn: 154785
* Implement the all_lookups_iterator for PCH as a follow-up to r153970. ThisNick Lewycky2012-04-162-0/+8
| | | | | | | | | | | includes a patch from Matthias Kleine with a regression testcase! Adds a new iterator 'data_iterator' to OnDiskHashTable which doesn't try to reconstruct the external_key from the internal_key, which is useful for traits that don't store enough information to do that mapping in their key. Also deletes the 'item_iterator' from OnDiskHashTable as dead code. llvm-svn: 154784
* Provide result types for code completions that describe built-inDouglas Gregor2011-10-182-20/+20
| | | | | | expressions (this, sizeof, etc.). llvm-svn: 142424
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-041-7/+4
| | | | | | | | | | | | | | Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 llvm-svn: 139086
* Fix an assertion when code-completing, rdar://9288730 & http://llvm.org/PR9728.Argyrios Kyrtzidis2011-04-231-0/+9
| | | | llvm-svn: 130042
* Don't suggest dynamic_cast or typeid as code completion results whenDouglas Gregor2011-04-121-2/+56
| | | | | | | | RTTI is disabled. Similarly, don't suggest throw or try as code completion results when C++ exceptions are disabled. Fixes <rdar://problem/9193560>. llvm-svn: 129346
* Don't crash when code-completing after "#include <". It would be farDouglas Gregor2010-12-091-0/+3
| | | | | | | better to actually produce a decent set of completions by checking the system include paths, but not today. Fixes PR8744. llvm-svn: 121431
* Revert the fix for PR8013.Douglas Gregor2010-11-091-4/+2
| | | | | | | | | | | | | That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. llvm-svn: 118620
* Handle overload resolution when calling an overloaded function setDouglas Gregor2010-11-091-2/+4
| | | | | | with, e.g., (&f)(a, b, c). Fixes PR8013. llvm-svn: 118508
* Add support for code completion on stdin.Dan Gohman2010-10-261-0/+7
| | | | llvm-svn: 117414
* Fix the mapping of vertical-space cursor kinds to produce a newline,Douglas Gregor2010-10-081-1/+1
| | | | | | rather than a space. llvm-svn: 116097
* When provide code completions for a variadic Objective-C methodDouglas Gregor2010-08-311-1/+1
| | | | | | | | declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. llvm-svn: 112579
* When performing code completion for a case statement in a switch whoseDouglas Gregor2010-07-281-2/+19
| | | | | | | condition is not of enumeration type, provide code-completion results containing all values of integral or enumeral type. llvm-svn: 109677
* Only filter out names reserved for the implementation (e.g., __blah orDouglas Gregor2010-07-142-4/+10
| | | | | | | _Foo) from code-completion results when they come from a system header. llvm-svn: 108338
* Make -code-completion-patterns only cover multi-line codeDouglas Gregor2010-05-282-30/+34
| | | | | | | completions. Plus, tweak a few completion patterns to better reflect the language grammar. llvm-svn: 104905
* Only enable code patterns (e.g., try { statements } catch (...) {Douglas Gregor2010-05-253-6/+6
| | | | | | statements }) in the code-completion results if explicitly requested. llvm-svn: 104637
* when code completing inside a C-style block comment, don't emit errors aboutChris Lattner2010-05-161-0/+7
| | | | | | | | a missing */ since we truncated the file. This fixes rdar://7948776 llvm-svn: 103913
* When code completion produces an overload set as its results (e.g.,Douglas Gregor2010-04-061-0/+1
| | | | | | | while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. llvm-svn: 100558
* Do not produce semicolons at the end of code-completion resultsDouglas Gregor2010-04-061-9/+9
| | | | llvm-svn: 100557
* Only prove macros as code-completion results when we're in a caseDouglas Gregor2010-04-061-4/+0
| | | | | | | statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". llvm-svn: 100555
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-103-14/+14
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Teach code-completion to deal with calls to functions without prototypes.Douglas Gregor2010-01-211-0/+15
| | | | llvm-svn: 94076
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-1317-248/+251
| | | | | | | | the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-101-0/+170
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* Teach Preprocessor::macro_begin/macro_end to lazily load all macroDouglas Gregor2010-01-042-7/+12
| | | | | | | | definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. llvm-svn: 92497
* Extend code-completion results with the type of each resultDouglas Gregor2009-12-183-20/+20
| | | | llvm-svn: 91702
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-1521-27/+27
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Make tests use the new clang -cc1 flag.Fariborz Jahanian2009-12-141-2/+2
| | | | llvm-svn: 91303
* Add a function's cv-qualifiers to the code-completion results as anDouglas Gregor2009-12-111-2/+2
| | | | | | informative chunk. llvm-svn: 91139
* Teach code completion to instantiate templates when it needs toDouglas Gregor2009-12-111-5/+17
| | | | llvm-svn: 91138
* Member function templates can occur after . or ->Douglas Gregor2009-12-111-3/+12
| | | | llvm-svn: 91137
* Tweak code-completion results by suppressing class templateDouglas Gregor2009-12-111-1/+1
| | | | | | | | | specializations and class template partial specializations (they're never named directly). Also, member access expressions only refer to value declarations (fields, functions, enumerators, etc.) and Objective-C property declarations; filter out everything else. llvm-svn: 91133
* Class template (partial) specializations should not show up in code ↵Douglas Gregor2009-12-111-3/+3
| | | | | | completion results llvm-svn: 91125
* Improve code-completion results for the flags in an @propertyDouglas Gregor2009-11-191-29/+0
| | | | | | | | | declaration by providing patterns for "getter = <method>" and "setter = <method>". As part of this, invented a new "pattern" result kind that is merely a semantic string. The "pattern" result kind should help with other kinds of code templates. llvm-svn: 89277
* Refactor code-completion support for message sends, collecting theDouglas Gregor2009-11-171-1/+1
| | | | | | | | | code to find and add Objective-C methods (starting at an ObjCContainerDecl) into a single, static function. Also, make sure that we search into the implementations of classes and categories to find even more methods. llvm-svn: 89163
* Remove RUN: true lines.Daniel Dunbar2009-11-0820-20/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-0822-25/+25
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Add basic code completion support for ObjC messages.Steve Naroff2009-11-071-0/+35
| | | | | | Still a work in progress... llvm-svn: 86323
* Various improvements to Clang's code-completion infrastructure:Douglas Gregor2009-11-071-2/+2
| | | | | | | | | | | | | | - Introduce more code-completion string "chunk" kinds that describe symbols, the actual text that the user is expected to type, etc. - Make the generation of macro results optional, since it can be slow - Make code-completion accessible through the C API, marshalling the code-completion results through a temporary file (ick) to maintain process separation. The last doesn't have tests yet. llvm-svn: 86306
OpenPOWER on IntegriCloud