summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Include macros in code-completion resultsDouglas Gregor2009-10-301-0/+37
| | | | llvm-svn: 85594
* - Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS ↵Steve Naroff2009-10-081-9/+9
| | | | | | | | (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. llvm-svn: 83597
* Add code completion support for ObjC property declarations/attributes.Steve Naroff2009-10-081-0/+29
| | | | llvm-svn: 83579
* Determinism is for wimps. <Wimper>Douglas Gregor2009-09-282-6/+6
| | | | llvm-svn: 82962
* Clean up the CodeCompletion testsuite's use of FileCheckDouglas Gregor2009-09-249-24/+25
| | | | llvm-svn: 82726
* For code completion, note that injected-class-names found as part ofDouglas Gregor2009-09-231-0/+1
| | | | | | | | lookup in a member access expression always start a nested-name-specifier. Additionally, rank names that start nested-name-specifiers after other names. llvm-svn: 82663
* When code-completion after a "," is building an overload set, noteDouglas Gregor2009-09-231-3/+3
| | | | | | | | that there is one more argument (the one following the comma) and make the candidate non-viable if the function cannot accept any argument in that position. llvm-svn: 82625
* Print the results of code-completion for overloading by displaying theDouglas Gregor2009-09-231-5/+5
| | | | | | | signature of the function with the current parameter highlighted as a placeholder. llvm-svn: 82593
* Separate the code-completion results for call completion from theDouglas Gregor2009-09-231-7/+6
| | | | | | | | results for other, textual completion. For call completion, we now produce enough information to show the function call argument that we are currently on. llvm-svn: 82592
* When code-completion finds a declaration only because it is usable asDouglas Gregor2009-09-221-2/+2
| | | | | | | the start of a nested-name-specifier, add the "::" after the nested-name-specifier to the code-completion string. llvm-svn: 82587
* Tweak the code-completion results ranking and formation, so thatDouglas Gregor2009-09-226-22/+22
| | | | | | | | | | | members found in base classes have the same ranking as members found in derived classes. However, we will introduce an informative note for members found in base classes, showing (as a nested-name-specifier) the qualification to name the base class, to make it clear which members are from bases. llvm-svn: 82586
* Teach code-completion to introduce a ", ..." placeholder for variadic functionsDouglas Gregor2009-09-221-2/+2
| | | | llvm-svn: 82577
* Replace the -code-completion-dump option with Douglas Gregor2009-09-2220-93/+108
| | | | | | | | | | | -code-completion-at=filename:line:column which performs code completion at the specified location by truncating the file at that position and enabling code completion. This approach makes it possible to run multiple tests from a single test file, and gives a more natural command-line interface. llvm-svn: 82571
* Implement code completion within a function call, triggered after theDouglas Gregor2009-09-221-0/+22
| | | | | | | | | | | | | | | | | | | | | opening parentheses and after each comma. We gather the set of visible overloaded functions, perform "partial" overloading based on the set of arguments that we have thus far, and return the still-viable results sorted by the likelihood that they will be the best candidate. Most of the changes in this patch are a refactoring of the overloading routines for a function call, since we needed to separate out the notion of building an overload set (common to code-completion and normal semantic analysis) and then what to do with that overload set. As part of this change, I've pushed explicit template arguments into a few more subroutines. There is still much more work to do in this area. Function templates won't be handled well (unless we happen to deduce all of the template arguments before we hit the completion point), nor will overloaded function-call operators or calls to member functions. llvm-svn: 82549
* Code completion for ordinary names when we're starting a declaration, ↵Douglas Gregor2009-09-211-0/+12
| | | | | | expression, or statement llvm-svn: 82481
* When providing a code-completion suggestion for a hidden name, includeDouglas Gregor2009-09-211-1/+1
| | | | | | | | | | | | | | a nested-name-specifier that describes how to refer to that name. For example, given: struct Base { int member; }; struct Derived : Base { int member; }; the code-completion result for a member access into "Derived" will provide both "member" to refer to Derived::member (no qualification needed) and "Base::member" to refer to Base::member (qualification included). llvm-svn: 82476
* Enhance "case" code completion in C++ to suggest qualified names forDouglas Gregor2009-09-212-0/+62
| | | | | | | | | enumerators when either the user intentionally wrote a qualified name (in which case we just use that nested-name-specifier to match the user's code) or when this is the first "case" statement and we need a qualified name to refer to an enumerator in a different scope. llvm-svn: 82474
* Code completion for "case" statements within a switch on an expressionDouglas Gregor2009-09-211-0/+27
| | | | | | of enumeration type, providing the various unused enumerators as options. llvm-svn: 82467
* In C++ code completion, only suggest the "template" keyword after ".",Douglas Gregor2009-09-181-1/+0
| | | | | | | "->", or "::" if we will be looking into a dependent context. It's not wrong to use the "template" keyword, but it's to needed, either. llvm-svn: 82307
* Make the construction of the code-completion string for a functionDouglas Gregor2009-09-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | template smarter, by taking into account which function template parameters are deducible from the call arguments. For example, template<typename RandomAccessIterator> void sort(RandomAccessIterator first, RandomAccessIterator last); will have a code-completion string like sort({RandomAccessIterator first}, {RandomAccessIterator last}) since the template argument for its template parameter is deducible. On the other hand, template<class X, class Y> X* dyn_cast(Y *Val); will have a code-completion string like dyn_cast<{class X}>({Y *Val}) since the template type parameter X is not deducible from the function call. llvm-svn: 82306
* Introduce code completion patterns for templates, which provide theDouglas Gregor2009-09-181-0/+17
| | | | | | angle brackets < > along with placeholder template arguments. llvm-svn: 82304
* Introduce code completion strings, which describe how to *use* theDouglas Gregor2009-09-181-0/+9
| | | | | | | results of code completion, e.g., by providing function call syntax with placeholders for each of the parameters. llvm-svn: 82293
* C++ code completion after the "operator" keyword. Provide overloadedDouglas Gregor2009-09-181-0/+19
| | | | | | operators, type specifiers, type names, and nested-name-specifiers. llvm-svn: 82264
* Introduce four new code-completion hooks for C++:Douglas Gregor2009-09-184-0/+88
| | | | | | | | | | - after "using", show anything that can be a nested-name-specifier. - after "using namespace", show any visible namespaces or namespace aliases - after "namespace", show any namespace definitions in the current scope - after "namespace identifier = ", show any visible namespaces or namespace aliases llvm-svn: 82251
OpenPOWER on IntegriCloud