Message ID | 20201020052905.89267-9-hiroh@chromium.org |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Hiro-san, Thank you for the patch. On Tue, Oct 20, 2020 at 02:29:05PM +0900, Hirokazu Honda wrote: > The option, -Wxtra-semi, helps developers to find unnecessary s/-Wxtra-semi/-Wextra-semi/ > semicolons. This option is available with clang. > > Signed-off-by: Hirokazu Honda <hiroh@chromium.org> > --- > meson.build | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/meson.build b/meson.build > index de15cc1..480c861 100644 > --- a/meson.build > +++ b/meson.build > @@ -64,6 +64,12 @@ if cc.get_id() == 'clang' > '-stdlib=libc++', > ] > endif > + > + if cc.has_argument('-Wextra-semi') > + cpp_arguments += [ > + '-Wextra-semi', > + ] > + endif The flag has been supported by clang since v4.0.0, I think we can drop the has_arguments check. Apart from that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > endif > > if cc.get_id() == 'gcc'
On Tue, Oct 20, 2020 at 4:52 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > > Hi Hiro-san, > > Thank you for the patch. > > On Tue, Oct 20, 2020 at 02:29:05PM +0900, Hirokazu Honda wrote: > > The option, -Wxtra-semi, helps developers to find unnecessary > > s/-Wxtra-semi/-Wextra-semi/ > > > semicolons. This option is available with clang. > > > > Signed-off-by: Hirokazu Honda <hiroh@chromium.org> > > --- > > meson.build | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/meson.build b/meson.build > > index de15cc1..480c861 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -64,6 +64,12 @@ if cc.get_id() == 'clang' > > '-stdlib=libc++', > > ] > > endif > > + > > + if cc.has_argument('-Wextra-semi') > > + cpp_arguments += [ > > + '-Wextra-semi', > > + ] > > + endif > > The flag has been supported by clang since v4.0.0, I think we can drop > the has_arguments check. Apart from that, > Thanks, as clang 4.0.0 is released in March 2017, let's drop has_arguments. Regards, -Hiro > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > endif > > > > if cc.get_id() == 'gcc' > > -- > Regards, > > Laurent Pinchart
diff --git a/meson.build b/meson.build index de15cc1..480c861 100644 --- a/meson.build +++ b/meson.build @@ -64,6 +64,12 @@ if cc.get_id() == 'clang' '-stdlib=libc++', ] endif + + if cc.has_argument('-Wextra-semi') + cpp_arguments += [ + '-Wextra-semi', + ] + endif endif if cc.get_id() == 'gcc'
The option, -Wxtra-semi, helps developers to find unnecessary semicolons. This option is available with clang. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+)