clang's -Wextra-semi-stmt shows a large number of warnings that
should be cleaned up in the linux kernel. clang's fixer removes
just the semicolon. This is not always the best solution because
it either causes other whitespace problems or there is a better
semicolon to remove.
This change introduces linuxkernel-extra-semi as a place to
collect special purpose fixers. Starting with two fixers set by
the option 'Fixer'
'Switch'
switch() {} ; <-- the ';' is not needed.
The fixer takes care of formatting issues of having an empty line
when the ';' is removed.
'TrailingMacro'
#define M(a) a++; <-- clang-tidy fixes problem here
int f() {
int v = 0; M(v); <-- clang reports problem here return v;
}
Removing the semicolon at the macro use will fail checkpatch,
removing at the macro definition will not.
Can this enum be declared within the class scope of ExtraSemiCheck rather than outside of it?