HighCommander4 wrote:

I read up on this a bit; https://github.com/Microsoft/vscode/issues/62110 seems 
particularly relevant.

Based on [this 
comment](https://github.com/Microsoft/vscode/issues/62110#issuecomment-456240329):

> [...] we have an `auto fix` action in the editor that fixes individual errors

it seems that I did misunderstand the purpose of the "Auto fix" command in 
vscode; it looks like it's only intended to fix a single a error.

The proposal in that thread (which has since been implemented in vscode) does 
include a way to apply all quick-fixes in a file: it's the `"source.fixAll"` 
protocol described in https://github.com/clangd/clangd/issues/1446. It doesn't 
have to be invoked automatically on file-save, it can be invoked manually via a 
command (which in vscode is called "Fix all", and seems to only be enabled if 
the server advertises support for `"source.fixAll"`).

Conclusion: there's probably not much point proceeding with this patch (the 
slight behaviour change described in the previous comment doesn't seem very 
helpful), but instead we should fix 
https://github.com/clangd/clangd/issues/1446 and then the desired scenario 
should work using the "Fix all" command (and as an added bonus, there is no 
need to select the entire file contents, "Fix all" automatically applies to the 
whole file).

https://github.com/llvm/llvm-project/pull/79448
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to