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

Hans Wennborg hans at hanshq.net
Wed Apr 15 03:02:21 PDT 2015


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 \





More information about the cfe-commits mailing list