summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-14 20:36:01 +0000
committerChris Lattner <sabre@nondot.org>2009-04-14 20:36:01 +0000
commitb874dbd4784e1fd258d2fccbd4ad7afdf8956d4b (patch)
tree562d3a98c5e7556813aaba8cde4bdaa8a743ef2e /clang
parent28549de12cb11da6f86ad042fa5a16783224893e (diff)
downloadbcm5719-llvm-b874dbd4784e1fd258d2fccbd4ad7afdf8956d4b.tar.gz
bcm5719-llvm-b874dbd4784e1fd258d2fccbd4ad7afdf8956d4b.zip
add support for -W[no-]extra-tokens
llvm-svn: 69071
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Driver/Options.def1
-rw-r--r--clang/tools/clang-cc/Warnings.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Options.def b/clang/include/clang/Driver/Options.def
index 0f592303742..a9074e88f0a 100644
--- a/clang/include/clang/Driver/Options.def
+++ b/clang/include/clang/Driver/Options.def
@@ -322,6 +322,7 @@ OPTION("-Wnewline-eof", Wnewline_eof, Flag, clang_ignored_W_Group, INVALID, "",
OPTION("-Wno-#warnings", Wno__HASHwarnings, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
OPTION("-Wno-comment", Wno_comment, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
OPTION("-Wno-deprecated-declarations", Wno_deprecated_declarations, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-extra-tokens", Wno_extra_tokens, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
OPTION("-Wno-format-nonliteral", Wno_format_nonliteral, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
OPTION("-Wno-format-y2k", Wno_format_y2k, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
OPTION("-Wno-four-char-constants", Wno_four_char_constants, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
diff --git a/clang/tools/clang-cc/Warnings.cpp b/clang/tools/clang-cc/Warnings.cpp
index d21c79411e1..1dfe77abd90 100644
--- a/clang/tools/clang-cc/Warnings.cpp
+++ b/clang/tools/clang-cc/Warnings.cpp
@@ -121,6 +121,7 @@ namespace {
// First the table sets describing the diagnostics controlled by each option.
static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };
static const diag::kind FloatEqualDiags[] = { diag::warn_floatingpoint_eq };
+static const diag::kind ExtraTokens[] = { diag::ext_pp_extra_tokens_at_eol };
static const diag::kind ReadOnlySetterAttrsDiags[] = {
diag::warn_objc_property_attr_mutually_exclusive
};
@@ -147,7 +148,8 @@ static const diag::kind TrigraphsDiags[] = {
//static const diag::kind StrictSelectorMatchDiags[] = { };
// Second the table of options. MUST be sorted by name! Binary lookup is done.
static const WarningOption OptionTable[] = {
- { "deprecated-declarations", DIAGS(DeprecatedDeclarations) },
+ { "deprecated-declarations", DIAGS(DeprecatedDeclarations) },
+ { "extra-tokens", DIAGS(ExtraTokens) },
{ "float-equal", DIAGS(FloatEqualDiags) },
{ "format-nonliteral", DIAGS(FormatNonLiteralDiags) },
{ "implicit-function-declaration", DIAGS(ImplicitFunctionDeclarationDiags) },
OpenPOWER on IntegriCloud