From 5615f6bcd5fdd2719e541c8df2c48b6f062f29da Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 15 Apr 2015 10:02:21 +0000 Subject: [PATCH] clang-cl: support -fsyntax-only (PR23197) This might help running Clang tooling (which appends this option) with clang-cl command-lines. llvm-svn: 234990 --- clang/include/clang/Driver/Options.td | 3 ++- clang/test/Driver/cl-options.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 24674c709399..714943d2b187 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/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/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 032f1cd9e0a1..e36462dab621 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/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 \