diff options
author | Eric Liu <ioeric@google.com> | 2018-05-24 11:20:19 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2018-05-24 11:20:19 +0000 |
commit | 42abe419e24c6615a835fca62c1b3085e7957de8 (patch) | |
tree | 05aa0dec3a261c99c3a22be57b58f34b431aab36 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | b3c442a118e1980933a1cd6fad7c273da19c2af5 (diff) | |
download | bcm5719-llvm-42abe419e24c6615a835fca62c1b3085e7957de8.tar.gz bcm5719-llvm-42abe419e24c6615a835fca62c1b3085e7957de8.zip |
[clangd] Fix code completion in MACROs with stringification.
Summary:
Currently, we only handle the first callback from sema code completion
and ignore results from potential following callbacks. This causes
causes loss of completion results when multiple contexts are tried by Sema.
For example, we wouldn't get any completion result in the following completion
as the first attemped context is natural language which has no
candidate. The parser would backtrack and tried a completion with AST
semantic, which would find candidate "::x".
```
void f(const char*, int);
#define F(x) f(#x, x)
int x;
void main() {
F(::^);
}
```
To fix this, we only process a sema callback when it gives completion results or
the context supports index-based completion.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: klimek, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47256
llvm-svn: 333174
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
0 files changed, 0 insertions, 0 deletions