diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-07-07 05:53:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-07-07 05:53:30 +0000 |
commit | e8cf7d143446c45568bb7c9a6fbd8f32ca6ae93e (patch) | |
tree | 74441cc516babcf2ffdc1f8e76502252a793e395 /lib/Driver/Tools.cpp | |
parent | 3b4c53259603ba389373362f476648b2b1ab9eca (diff) |
Re-apply r159875 with fixes.
- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index dd198a1e9d..66d792ffba 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2093,7 +2093,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } Args.AddAllArgs(CmdArgs, options::OPT_W_Group); - Args.AddLastArg(CmdArgs, options::OPT_pedantic); + if (Args.hasFlag(options::OPT_pedantic, options::OPT_no_pedantic, false)) + CmdArgs.push_back("-pedantic"); Args.AddLastArg(CmdArgs, options::OPT_pedantic_errors); Args.AddLastArg(CmdArgs, options::OPT_w); |