aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-23 19:03:36 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-23 19:03:36 +0000
commita880db0b0fc028abf754c290d921d809eec0518a (patch)
tree6e5a517a7ee9179d281111c29854758c4a5be85b /lib
parentb355692a7f9349e9af747b6b444ce56e9228a696 (diff)
Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually these should disappear. Here is a more readable list than is in the diff: W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts, -Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces, -Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants, -Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas, -Wno-unused-parameter, -Wparentheses, -Wpointer-arith, -Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch, -Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable, -Wwrite-strings. f options: -fasm-blocks, -fmessage-length=. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Driver/Tools.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index dac9a6e365..bd8404b784 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -334,6 +334,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath(C, "clang").c_str());
Dest.addCommand(new Command(Exec, CmdArgs));
+
+ // Claim some arguments which clang doesn't support, but we don't
+ // care to warn the user about.
+
+ // FIXME: Use iterator.
+ for (ArgList::const_iterator
+ it = Args.begin(), ie = Args.end(); it != ie; ++it) {
+ const Arg *A = *it;
+ if (A->getOption().matches(options::OPT_clang_ignored_W_Group) ||
+ A->getOption().matches(options::OPT_clang_ignored_f_Group))
+ A->claim();
+ }
}
void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,