From: Hans Wennborg Date: Wed, 15 Apr 2015 10:02:21 +0000 (+0000) Subject: clang-cl: support -fsyntax-only (PR23197) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=692b0e2a91b25c39be4dd2cefec805e7fe0e6ace;p=clang clang-cl: support -fsyntax-only (PR23197) This might help running Clang tooling (which appends this option) with clang-cl command-lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234990 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 24674c7093..714943d2b1 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -934,7 +934,8 @@ def fstrict_enums : Flag<["-"], "fstrict-enums">, Group, Flags<[CC1Opti HelpText<"Enable optimizations based on the strict definition of an enum's " "value range">; def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group; -def fsyntax_only : Flag<["-"], "fsyntax-only">, Flags<[DriverOption,CC1Option]>, Group; +def fsyntax_only : Flag<["-"], "fsyntax-only">, + Flags<[DriverOption,CoreOption,CC1Option]>, Group; def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group; def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group; def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 032f1cd9e0..e36462dab6 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -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 \