[PATCH] D90180: [clang-tidy] find/fix unneeded semicolon after switch
Tom Rix via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 11:28:42 PDT 2020
trixirt created this revision.
trixirt added reviewers: alexfh, nickdesaulniers.
trixirt added projects: clang, clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
trixirt requested review of this revision.
Cleaning up -Wextra-semi-stmt in the linux kernel shows a high
incidence of 'switch() {} ;' The ';' is not needed.
This is special case of the Parser::ConsumeExtraSemi() fixer.
This fixer allows the fixes to be batched and takes care of the
formatting issue of having an empty line when the ';' is removed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90180
Files:
clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt
clang-tools-extra/clang-tidy/linuxkernel/LinuxKernelTidyModule.cpp
clang-tools-extra/clang-tidy/linuxkernel/SwitchSemiCheck.cpp
clang-tools-extra/clang-tidy/linuxkernel/SwitchSemiCheck.h
clang-tools-extra/test/clang-tidy/checkers/linuxkernel-switch-semi.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90180.300748.patch
Type: text/x-patch
Size: 4938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201026/bceb5fdf/attachment-0001.bin>
More information about the cfe-commits
mailing list