[PATCH] D57739: [clangd] Format tweak's replacements.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 03:39:18 PST 2019


sammccall added a comment.

In D57739#1390315 <https://reviews.llvm.org/D57739#1390315>, @ilya-biryukov wrote:

> In D57739#1390252 <https://reviews.llvm.org/D57739#1390252>, @sammccall wrote:
>
> > I agree with this concern, and don't think this is an appropriate layer to be aware of styling or failing on format errors. Can we consider moving the formatting to clangdserver as originally planned?
>
>
> `clang-format` seems to be somewhat stable, do we actually expect that to be a large problem in practice?
>  On the other side, I can't imagine any clients that don't need formatting? E.g. it's nice when tests give the same results as one would see in the final clangd and tests don't go through `ClangdServer`.


It's not about stability or whether the functionality is desired, but layering.
Unit tests having narrow scope is a good thing - if we want system tests that check clangdserver's behavior, they should test clangdserver.
Clients that don't go through clangdserver probably want formatting, but an immediate cleanupAndFormat on each generated change isn't necessarily the right way to do that.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57739/new/

https://reviews.llvm.org/D57739





More information about the cfe-commits mailing list