[PATCH] D63085: Provide a fix-it hint for -Wswitch, which adds missing cases. If there are >3 cases, the inserted text will contain newlines so it will not be shown in console output (but will be applied by -fixit, available to libclang and clangd, etc).

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 06:04:35 PDT 2022


aaron.ballman added a comment.

In D63085#3384302 <https://reviews.llvm.org/D63085#3384302>, @iamsergio wrote:

> I don't think we need to worry about formatting, that's the IDE's job (and whatever formatter it uses).
> In general, the code that knows how to warn should also be the one that knows how to fix it, this looks like a good place to me.
>
> Can we unblock this ? Probably this anymore though.

I don't think formatting concerns should block progress on this; we expect users to run clang-format to fix formatting issues instead of hoping the fix-it system gets it right.


Repository:
  rC Clang

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

https://reviews.llvm.org/D63085



More information about the cfe-commits mailing list