diff options
| author | Ilya Biryukov <ibiryukov@google.com> | 2018-11-07 10:02:31 +0000 |
|---|---|---|
| committer | Ilya Biryukov <ibiryukov@google.com> | 2018-11-07 10:02:31 +0000 |
| commit | ebf0a6d75dcb5715d5bf7097e749a4249d01e956 (patch) | |
| tree | 8de53754d6278f1ffac8aced98e3ba6546677362 /clang/lib/Sema/SemaChecking.cpp | |
| parent | ed4bb266c8531a28399b2fab8161ff67e4eaa650 (diff) | |
| download | bcm5719-llvm-ebf0a6d75dcb5715d5bf7097e749a4249d01e956.tar.gz bcm5719-llvm-ebf0a6d75dcb5715d5bf7097e749a4249d01e956.zip | |
[CodeComplete] Do not complete self-initializations
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
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions

