[PATCH] D91789: [clang-tidy] find/fix unneeded trailing semicolons in macros
Tom Rix via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 19 05:38:41 PST 2020
trixirt created this revision.
trixirt added reviewers: nickdesaulniers, alexfh, hokein, aaron.ballman.
trixirt added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
Herald added a project: clang.
trixirt requested review of this revision.
Cleaning up -Wextra-semi-stmt in the linux kernel shows a high
incidence of macros with trailing semicolons
#define M(a) a++; <-- clang-tidy fixes problem here
int f() {
int v = 0;
M(v); <-- clang reports problem here
return v;
}
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91789
Files:
clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt
clang-tools-extra/clang-tidy/linuxkernel/LinuxKernelTidyModule.cpp
clang-tools-extra/clang-tidy/linuxkernel/MacroTrailingSemiCheck.cpp
clang-tools-extra/clang-tidy/linuxkernel/MacroTrailingSemiCheck.h
clang-tools-extra/test/clang-tidy/checkers/linuxkernel-macro-trailing-semi.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91789.306381.patch
Type: text/x-patch
Size: 8760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201119/f68960a9/attachment.bin>
More information about the cfe-commits
mailing list