]> granicus.if.org Git - clang/commitdiff
add support for -W[no-]extra-tokens
authorChris Lattner <sabre@nondot.org>
Tue, 14 Apr 2009 20:36:01 +0000 (20:36 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Apr 2009 20:36:01 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69071 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.def
tools/clang-cc/Warnings.cpp

index 0f59230374246ea7473f58d6eab9f6cbaa7777d4..a9074e88f0af2e0522e84093f13373582e162b54 100644 (file)
@@ -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)
index d21c79411e1b1a63413dd46be490e87e826c5cf7..1dfe77abd90cf93c9c1bd99aba268411b11c1b87 100644 (file)
@@ -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) },