]> granicus.if.org Git - clang/commitdiff
Add support for -Wdeprecated-declarations.
authorSteve Naroff <snaroff@apple.com>
Tue, 31 Mar 2009 15:00:11 +0000 (15:00 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 31 Mar 2009 15:00:11 +0000 (15:00 +0000)
This fixes <rdar://problem/6712496> Unable to disable deprecated warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68108 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/Warnings.cpp

index 54155e45a646fa0582bc31be0c19157db006b488..698e44fb7d4cb92bacc9a2902356510eab090ec8 100644 (file)
@@ -139,10 +139,13 @@ static const diag::kind ImplicitFunctionDeclarationDiags[] = {
 static const diag::kind PointerSignDiags[] = {
   diag::ext_typecheck_convert_incompatible_pointer_sign
 };
+static const diag::kind DeprecatedDeclarations[] = { diag::warn_deprecated };
+
 // Hmm ... this option is currently actually completely ignored.
 //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) },
   { "float-equal",           DIAGS(FloatEqualDiags) },
   { "format-nonliteral",     DIAGS(FormatNonLiteralDiags) },
   { "implicit-function-declaration", DIAGS(ImplicitFunctionDeclarationDiags) },