summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/member-access.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeComplete] Omit templated constructors from member list too.Sam McCall2018-01-221-12/+14
| | | | | | Also avoid printing a 'void' return type for constructor expressions. llvm-svn: 323148
* [Completion] Code complete the members for a dependent type after a '::'Alex Lorenz2017-06-151-0/+18
| | | | | | | | | | This commit is a follow up to r302797 which added support for dependent completions after the '.' and '->' operators. This commit adds support for dependent completions after the '::' operator. Differential Revision: https://reviews.llvm.org/D34173 llvm-svn: 305511
* [CodeCompletion] Provide member completions for dependent expressions whoseAlex Lorenz2017-05-111-0/+80
| | | | | | | | | | | | | | type is a TemplateSpecializationType or InjectedClassNameType Fixes PR30847. Partially fixes PR20973 (first position only). PR17614 is still not working, its expression has the dependent builtin type. We'll have to teach the completion engine how to "resolve" dependent expressions to fix it. rdar://29818301 llvm-svn: 302797
* [libclang] Fix crash in member access code completion with implicit baseErik Verbruggen2017-03-281-0/+14
| | | | | | | | | | If there is an unresolved member access AST node, and the base is implicit, do not access/use it for generating candidate overloads for code completion results. Fixes PR31093. llvm-svn: 298903
* [code-completion] Fix crash when trying to do postfix completion of instance ↵Argyrios Kyrtzidis2017-01-151-1/+13
| | | | | | member inside a static function. llvm-svn: 292052
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-131-11/+11
| | | | | | | | 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
* Extend code-completion results with the type of each resultDouglas Gregor2009-12-181-8/+8
| | | | llvm-svn: 91702
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* Add a function's cv-qualifiers to the code-completion results as anDouglas Gregor2009-12-111-2/+2
| | | | | | informative chunk. llvm-svn: 91139
* 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
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Determinism is for wimps. <Wimper>Douglas Gregor2009-09-281-2/+2
| | | | llvm-svn: 82962
* 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
* Tweak the code-completion results ranking and formation, so thatDouglas Gregor2009-09-221-9/+9
| | | | | | | | | | | 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
* Replace the -code-completion-dump option with Douglas Gregor2009-09-221-4/+4
| | | | | | | | | | | -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
* 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
* Initial implementation of a code-completion interface in Clang. InDouglas Gregor2009-09-171-0/+42
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