[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The only way I'd suggest supporting this is via an option in config(like we do with the add using tweak), but I don't think even then it would get much use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118782/new/ https:

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler abandoned this revision. ckandeler added a comment. Fair enough. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118782/new/ https://reviews.llvm.org/D118782 ___ cfe-commits mailing list cfe-comm

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I agree with Sam on this one and remember having some (possibly offline) discussions around not having those breaks explicitly (we should've documented the reasoning, sorry). As pointed out, I believe the main benefit is not spelling out each enum value (it's usually

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. FWIW I prefer the existing behaviour (reasons below). @kadircet, thoughts? - The output with `break` is harder to visually scan. (In styles where `break` goes on its own line) - The output is annoying to edit when you *do* want to deal with blocks of cases at once. Wh

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 405893. ckandeler added a comment. Improved code as per review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118782/new/ https://reviews.llvm.org/D118782 Files: clang-tools-extra/clangd/refactor/t

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp:208-209 Text.append({EnumD->getName(), "::"}); Text.append({EnumConstant.second.getEnumConstant()->getName(), ":"}); +Text += "break;"; }

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-02 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 405240. ckandeler added a comment. Fixed unintentional whitespace change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118782/new/ https://reviews.llvm.org/D118782 Files: clang-tools-extra/clangd/refactor

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-02 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. ckandeler added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. ckandeler requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fall-through is no