This matches what GCC warns about when -pedantic is enabled.
This should avoid such redundant semicolons creeping into the codebase.
Differential D98941
[cmake] Enable Clang warnings about redundant semicolons mstorsjo on Mar 19 2021, 4:51 AM. Authored by
Details This matches what GCC warns about when -pedantic is enabled. This should avoid such redundant semicolons creeping into the codebase.
Diff Detail
Event TimelineComment Actions Maybe; Clang does warn about it if building with -std=c++98, in the form warning: extra ';' outside of a function is a C++11 extension [-Wc++11-extra-semi] though. But in C++11 mode, it only warns about it if this option is added, warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]. I'd say the Clang behaviour in itself makes sense (it's a new feature and you're supposed to be able to use it), so GCC is the odd one out there. Comment Actions I think GCC's behavior is not particularly helpful -- pedantically, the code is correct (in C++11 and later mode). LGTM with a small tweak!
Comment Actions I think one of the buildbots is failing with this IIUC? Looks like a straightforward fix, though that code hasn't changed recently, and this change went in over a month ago. Comment Actions It doesn't seem like it's failing over that to me? But it does indeed seem to spam a number of warnings in that setup. I pushed a commit to get rid of those redundant semicolons at least, in rG01d27fc40836 - thanks for noticing! |