[cfe-commits] r68117 - in /cfe/trunk: include/clang/Driver/Options.def test/Sema/surpress-deprecated.c
Steve Naroff
snaroff at apple.com
Tue Mar 31 10:28:26 PDT 2009
Author: snaroff
Date: Tue Mar 31 12:28:26 2009
New Revision: 68117
URL: http://llvm.org/viewvc/llvm-project?rev=68117&view=rev
Log:
Add -Wdeprecated-declarations to driver and add a test case.
Added:
cfe/trunk/test/Sema/surpress-deprecated.c
Modified:
cfe/trunk/include/clang/Driver/Options.def
Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=68117&r1=68116&r2=68117&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Tue Mar 31 12:28:26 2009
@@ -268,6 +268,7 @@
OPTION("-Wcast-align", Wcast_align, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wchar-align", Wchar_align, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wchar-subscripts", Wchar_subscripts, Flag, clang_ignored_W_Group, INVALID, "", 0)
+OPTION("-Wdeprecated-declarations", Wdeprecated_declarations, Flag, clang_W_Group, INVALID, "", 0)
OPTION("-Werror", Werror, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wextra", Wextra, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wfloat-equal", Wfloat_equal, Flag, clang_W_Group, INVALID, "", 0)
@@ -279,6 +280,7 @@
OPTION("-Wmissing-prototypes", Wmissing_prototypes, Flag, clang_W_Group, INVALID, "", 0)
OPTION("-Wmost", Wmost, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wnested-externs", Wnested_externs, Flag, clang_ignored_W_Group, INVALID, "", 0)
+OPTION("-Wno-deprecated-declarations", Wno_deprecated_declarations, Flag, clang_W_Group, INVALID, "", 0)
OPTION("-Wno-format-nonliteral", Wno_format_nonliteral, Flag, clang_W_Group, INVALID, "", 0)
OPTION("-Wno-format-y2k", Wno_format_y2k, Flag, clang_ignored_W_Group, INVALID, "", 0)
OPTION("-Wno-four-char-constants", Wno_four_char_constants, Flag, clang_ignored_W_Group, INVALID, "", 0)
Added: cfe/trunk/test/Sema/surpress-deprecated.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/surpress-deprecated.c?rev=68117&view=auto
==============================================================================
--- cfe/trunk/test/Sema/surpress-deprecated.c (added)
+++ cfe/trunk/test/Sema/surpress-deprecated.c Tue Mar 31 12:28:26 2009
@@ -0,0 +1,7 @@
+// RUN: clang -fsyntax-only -Wno-deprecated-declarations -verify %s
+extern void OldFunction() __attribute__((deprecated));
+
+int main (int argc, const char * argv[]) {
+ OldFunction();
+}
+
More information about the cfe-commits
mailing list