[PATCH] D135466: [clang-format] Add support to remove unnecessary semicolons after function definition
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 8 08:00:15 PDT 2022
MyDeveloperDay added a comment.
In D135466#3844287 <https://reviews.llvm.org/D135466#3844287>, @owenpan wrote:
> @MyDeveloperDay Cool!
>
> In D135466#3843792 <https://reviews.llvm.org/D135466#3843792>, @HazardyKnusperkeks wrote:
>
>> Maybe even extend the option to other unnecessary semicolons like `int x = 5;;` or other noop statements, one just has to be careful not to remove the semicolon when it's the sole if/loop body.
>
> IMO we should keep it simple for now. We can always extend it to an `enum` or `struct` down the road, similar to what I plan to do with `RemoveBracesLLVM`.
Thanks, everyone for all the reviews, I'll work on those.
I tend to agree here, I was really only focused on the extraneous `;` after a function, I sort of feel catching a double coding `;;` error or even adding a missing `;` after a functions `)` as prettier/vs code seems to do are different problem statements.
I certainly don't mind adding the capability to fix those too (in subsequent commits), I don't like to add too much in a single commit. (Especially the initial one that carries a lot of the infrastructure for a new feature).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135466/new/
https://reviews.llvm.org/D135466
More information about the cfe-commits
mailing list