From: Chris Lattner Date: Sat, 14 Feb 2009 08:27:44 +0000 (+0000) Subject: new tests, it would be nice to not warn on the second one. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4238254b9846589e401019349badbad9aa8b6fe6;p=clang new tests, it would be nice to not warn on the second one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64549 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c index c1a3ae3066..dfe01dc710 100644 --- a/test/Sema/attr-deprecated.c +++ b/test/Sema/attr-deprecated.c @@ -23,3 +23,12 @@ extern int var; int w() { return var; // expected-warning {{'var' is deprecated}} } + +int old_fn() __attribute__ ((deprecated)); +int old_fn(); +int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}} + +int old_fn() { + return old_fn()+1; // expected-warning {{'old_fn' is deprecated}} +} +