diff options
author | Steve Naroff <snaroff@apple.com> | 2009-03-31 17:28:26 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-03-31 17:28:26 +0000 |
commit | 1bf3b718cd549fcf058976bcd312a20886237021 (patch) | |
tree | 5a62839cf66e99e163a0ad09907819361b9cdbd5 | |
parent | 452e1c8a6a99f4142beccc8cc4a9fb4a0864e6cf (diff) | |
download | bcm5719-llvm-1bf3b718cd549fcf058976bcd312a20886237021.tar.gz bcm5719-llvm-1bf3b718cd549fcf058976bcd312a20886237021.zip |
Add -Wdeprecated-declarations to driver and add a test case.
llvm-svn: 68117
-rw-r--r-- | clang/include/clang/Driver/Options.def | 2 | ||||
-rw-r--r-- | clang/test/Sema/surpress-deprecated.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Options.def b/clang/include/clang/Driver/Options.def index 11668bb5908..19a10c0b0ba 100644 --- a/clang/include/clang/Driver/Options.def +++ b/clang/include/clang/Driver/Options.def @@ -268,6 +268,7 @@ OPTION("-Wall", Wall, Flag, clang_ignored_W_Group, INVALID, "", 0) 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-braces", Wmissing_braces, Flag, clang_ignored_W_Group, INVALID 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) diff --git a/clang/test/Sema/surpress-deprecated.c b/clang/test/Sema/surpress-deprecated.c new file mode 100644 index 00000000000..8dbe9dd3658 --- /dev/null +++ b/clang/test/Sema/surpress-deprecated.c @@ -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(); +} + |