r255524 - clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 15:47:56 PST 2015


On Tue, Dec 15, 2015 at 5:46 AM, Hans Wennborg via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: hans
> Date: Mon Dec 14 12:46:11 2015
> New Revision: 255524
>
> URL: http://llvm.org/viewvc/llvm-project?rev=255524&view=rev
> Log:
> clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)
>
> The documentation suggests /Wall should really turn on -Wextra and any
> other warnings that are not enabled by default. That would correspond
> to Clang's -Weverything, but is probably not what users want.
>

I'd be hesitant to water down an "enable all the warnings, including new
ones added in future compiler releases" like this... it seems a pretty
significant feature for users and to have the switch to LLVM stagnate their
warning bar when they were trying to do something more like -Weverything
(opt into everything, disable whatever is undesirable) might be unfortunate
for users.


>
> Modified:
>     cfe/trunk/include/clang/Driver/CLCompatOptions.td
>     cfe/trunk/test/Driver/cl-options.c
>
> Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=255524&r1=255523&r2=255524&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
> +++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Mon Dec 14 12:46:11
> 2015
> @@ -120,7 +120,7 @@ def _SLASH_W1 : CLFlag<"W1">, HelpText<"
>  def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
>  def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
>  def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">,
> Alias<WCL4>;
> -def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Wall">, Alias<Wall>;
> +def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Wall and -Wextra">,
> Alias<WCL4>;
>  def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
>    Alias<W_Joined>, AliasArgs<["error"]>;
>  def _SLASH_WX_ : CLFlag<"WX-">, HelpText<"Do not treat warnings as
> errors">,
>
> Modified: cfe/trunk/test/Driver/cl-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=255524&r1=255523&r2=255524&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/cl-options.c (original)
> +++ cfe/trunk/test/Driver/cl-options.c Mon Dec 14 12:46:11 2015
> @@ -174,7 +174,7 @@
>  // RUN: %clang_cl /W2 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
>  // RUN: %clang_cl /W3 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
>  // RUN: %clang_cl /W4 -### -- %s 2>&1 | FileCheck -check-prefix=W4 %s
> -// RUN: %clang_cl /Wall -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
> +// RUN: %clang_cl /Wall -### -- %s 2>&1 | FileCheck -check-prefix=W4 %s
>  // W1: -Wall
>  // W4: -WCL4
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151215/1b414fdb/attachment-0001.html>


More information about the cfe-commits mailing list