r234990 - clang-cl: support -fsyntax-only (PR23197)

Kim Gräsman kim.grasman at gmail.com
Wed Apr 15 03:20:44 PDT 2015


Cool, thanks!

We hacked around this in IWYU by adding /Zs or -fsyntax-only depending
on driver mode, but I think we should be able to retire that now,
then?

https://code.google.com/p/include-what-you-use/source/diff?spec=svn594&r=594&format=side&path=/trunk/iwyu_driver.cc

- Kim

On Wed, Apr 15, 2015 at 12:02 PM, Hans Wennborg <hans at hanshq.net> wrote:
> Author: hans
> Date: Wed Apr 15 05:02:21 2015
> New Revision: 234990
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234990&view=rev
> Log:
> clang-cl: support -fsyntax-only (PR23197)
>
> This might help running Clang tooling (which appends this option)
> with clang-cl command-lines.
>
> Modified:
>     cfe/trunk/include/clang/Driver/Options.td
>     cfe/trunk/test/Driver/cl-options.c
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=234990&r1=234989&r2=234990&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Wed Apr 15 05:02:21 2015
> @@ -934,7 +934,8 @@ def fstrict_enums : Flag<["-"], "fstrict
>    HelpText<"Enable optimizations based on the strict definition of an enum's "
>             "value range">;
>  def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>;
> -def fsyntax_only : Flag<["-"], "fsyntax-only">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>;
> +def fsyntax_only : Flag<["-"], "fsyntax-only">,
> +  Flags<[DriverOption,CoreOption,CC1Option]>, Group<Action_Group>;
>  def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
>  def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>;
>  def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>;
>
> Modified: cfe/trunk/test/Driver/cl-options.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=234990&r1=234989&r2=234990&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/cl-options.c (original)
> +++ cfe/trunk/test/Driver/cl-options.c Wed Apr 15 05:02:21 2015
> @@ -354,6 +354,7 @@
>  // RUN:     -fmsc-version=1800 \
>  // RUN:     -fno-strict-aliasing \
>  // RUN:     -fstrict-aliasing \
> +// RUN:     -fsyntax-only \
>  // RUN:     -mllvm -disable-llvm-optzns \
>  // RUN:     -Wunused-variable \
>  // RUN:     -fmacro-backtrace-limit=0 \
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list