summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Handle using declarations and overload sets in code completion.Douglas Gregor2009-09-181-0/+7
| | | | llvm-svn: 82233
* For code completion in C++ member access expressions and tag names,Douglas Gregor2009-09-181-0/+20
| | | | | | | | | | | | | look into the current scope for anything that could start a nested-names-specifier. These results are ranked worse than any of the results actually found in the lexical scope. Perform a little more pruning of the result set, eliminating constructors, __va_list_tag, and any duplication of declarations in the result set. For the latter, implemented NamespaceDecl::getCanonicalDecl. llvm-svn: 82231
* When gathering results for code completion, only include hiddenDouglas Gregor2009-09-181-1/+0
| | | | | | | results when there is some way to refer to them in the language, such as with a qualified name in C++. llvm-svn: 82223
* Implement code completion for tags, e.g., code completion after "enum"Douglas Gregor2009-09-181-0/+15
| | | | | | | | | | | | | will provide the names of various enumerations currently visible. Introduced filtering of code-completion results when we build the result set, so that we can identify just the kinds of declarations we want. This implementation is incomplete for C++, since we don't consider that the token after the tag keyword could start a nested-name-specifier. llvm-svn: 82222
* Initial implementation of a code-completion interface in Clang. InDouglas Gregor2009-09-173-0/+74
essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". llvm-svn: 82166
OpenPOWER on IntegriCloud