summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/ordinary-name.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeComplete] Include more text into typed chunks of pattern completionsIlya Biryukov2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: To allow filtering on any of the words in the editors. In particular, the following completions were changed: - 'using namespace <#name#>' Typed text before: 'using', after: 'using namespace'. - 'else if (#<condition#>)' Before: 'else', after: 'else if'. - 'using typename <#qualifier#>::<#name#>' Before: 'using', after: 'using typename'. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62615 llvm-svn: 362479
* [CodeComplete] Add a bit more whitespace to completed patternsIlya Biryukov2019-06-031-13/+13
| | | | | | | | | | | | | | | | | | | | Summary: E.g. we now turn `while(<#cond#>){` into `while (<#cond#>) {` This slightly improves the final output. Should not affect clients that format the result on their own. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62616 llvm-svn: 362363
* [CodeComplete] Add semicolon when completing patterns for 'static_assert' ↵Ilya Biryukov2019-05-291-4/+4
| | | | | | | | | and 'typedef This is a trivial follow-up to r360042, which added semicolons to other pattern completions, so sending without review. llvm-svn: 361974
* [CodeComplete] Consistently break after '{' in multi-line patternsIlya Biryukov2019-05-281-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Completion can return multi-line patterns in some cases, e.g. for (<#init#>; <#cond#>; <#inc#>) { <#body#> } However, most patterns break the line only before closing brace, resulting in code like: namespace <#name#> { <#decls#> } While some (e.g. the 'for' example above) are breaking lines after the opening brace too. This change ensures all patterns consistently break after the opening brace, this leads to nicer UX when using those in an actual editor. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62405 llvm-svn: 361829
* [CodeComplete] Add a trailing semicolons to some pattern completionsIlya Biryukov2019-05-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Where semicolon is required in any case. Here's a list of completions that now have a semicolon: - namespace <name> = <target>; - using namespace <name>; - using <qualifier>::<name>; - continue; - break; - goto <label>; - return; - return <expression>; Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61589 llvm-svn: 360042
* [CodeComplete] Do not complete self-initializationsIlya Biryukov2018-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Removes references to initialized variable from the following completions: int x = ^; Handles only the trivial cases where the variable name is completed immediately at the start of initializer or assignment, more complicated cases aren't covered, e.g. these completions still contain 'x': // More complicated expressions. int x = foo(^); int x = 10 + ^; // Other kinds of initialization. int x{^}; int x(^); // Constructor initializers. struct Foo { Foo() : x(^) {} int x; }; We should address those in the future, but they are outside of the scope of this initial change. Reviewers: sammccall Reviewed By: sammccall Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54156 llvm-svn: 346301
* [Tests] Modified Lit Tests to be C++11 compatibileCharles Li2015-08-271-5/+5
| | | | | | | This 2nd patch should not change the test results, but it is useful if clang's default C++ language is ever changed from gnu++98. llvm-svn: 246183
* Provide result types for code completions that describe built-inDouglas Gregor2011-10-181-19/+19
| | | | | | expressions (this, sizeof, etc.). llvm-svn: 142424
* 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
* 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
* Make -code-completion-patterns only cover multi-line codeDouglas Gregor2010-05-281-29/+33
| | | | | | | 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-251-4/+4
| | | | | | statements }) in the code-completion results if explicitly requested. llvm-svn: 104637
* Do not produce semicolons at the end of code-completion resultsDouglas Gregor2010-04-061-9/+9
| | | | llvm-svn: 100557
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-131-160/+161
| | | | | | | | 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
OpenPOWER on IntegriCloud