summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/ordinary-name-cxx11.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-12/+12
| | | | | | | | | | | | | | | | | | | | 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-8/+8
| | | | | | | | | 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-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CodeCompletion] Code complete the missing C++11 keywordsAlex Lorenz2017-02-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds context sensitive code completion support for the C++11 keywords that currently don't have completion results. The following keywords are supported by this patch: alignas constexpr static_assert noexcept (as a function/method qualifier) thread_local The following special identifiers are also supported: final (as a method qualifier or class qualifier) override rdar://29219185 Differential Revision: https://reviews.llvm.org/D28286 llvm-svn: 295001
* [Tests] Modified Lit Tests to be C++11 compatibileCharles Li2015-08-271-0/+252
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
OpenPOWER on IntegriCloud