HazardyKnusperkeks added a comment.
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.
================
Comment at: clang/include/clang/Format/Format.h:3076
+ /// \version 16
+ bool RemoveSemiColons;
+
----------------
The name is a bit hard, just from that it's not clear that this option is
harmless (modulo bugs). Maybe something like the said warning
`RemoveExtraSemiColons`?
================
Comment at: clang/unittests/Format/FormatTest.cpp:26755
+ "class Foo {\n"
+ " int getSomething() const { return something; };\n"
+ "};",
----------------
What happens with 2 (or more) semicolons?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135466/new/
https://reviews.llvm.org/D135466
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits