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:
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
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
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
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
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;";
}
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
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