kjedruczyk wrote:
E.g. If I change this path in following way:
```c++
if (!Offset) {
vlog("could not convert position '{0}' to offset for file '{1}': {2}",
Params.position, Params.textDocument.uri.file(), Offset.takeError());
return true; // completion code will log the error for invalid position.
}
```
We'll get the vlog output:
```
I[18:02:49.090] <-- textDocument/completion(1)
V[18:02:49.090] could not convert position '97:0' to offset for file
'/tmp/test.cpp': Line value is out of range (97)
E[18:02:49.091] Code completion position was invalid Line value is out of range
(97)
I[18:02:49.091] --> reply:textDocument/completion(1) 0 ms
```
I guess it is nicer than consuming the error?
https://github.com/llvm/llvm-project/pull/196112
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits