[PATCH] D98941: [cmake] Enable Clang warnings about redundant semicolons

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 05:07:02 PDT 2021


mstorsjo added a comment.

In D98941#2637120 <https://reviews.llvm.org/D98941#2637120>, @xbolva00 wrote:

> Shouldn’t we rather add that warning to -pedantic in Clang as well?
>
> cc @aaron.ballman @rsmith

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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98941/new/

https://reviews.llvm.org/D98941



More information about the llvm-commits mailing list