diff options
author | Martin Bohme <mboehme@google.com> | 2017-03-22 13:34:37 +0000 |
---|---|---|
committer | Martin Bohme <mboehme@google.com> | 2017-03-22 13:34:37 +0000 |
commit | 926572303e34c40a056a91df288734592ac03033 (patch) | |
tree | 39a1c907cadf0e7a981831ed1813cd0995bc4476 /clang/test/Sema/attr-deprecated.c | |
parent | b41979640f96d48231f45f6075a37ec78a6fd0fd (diff) | |
download | bcm5719-llvm-926572303e34c40a056a91df288734592ac03033.tar.gz bcm5719-llvm-926572303e34c40a056a91df288734592ac03033.zip |
Revert "Correct class-template deprecation behavior"
This reverts commit r298410 (which produces incorrect warnings, see
comments on https://reviews.llvm.org/rL298410).
llvm-svn: 298504
Diffstat (limited to 'clang/test/Sema/attr-deprecated.c')
-rw-r--r-- | clang/test/Sema/attr-deprecated.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/Sema/attr-deprecated.c b/clang/test/Sema/attr-deprecated.c index d6f560f1750..8566a0e9436 100644 --- a/clang/test/Sema/attr-deprecated.c +++ b/clang/test/Sema/attr-deprecated.c @@ -1,10 +1,10 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only int f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}} -void g() __attribute__((deprecated));// expected-note {{'g' has been explicitly marked deprecated here}} -void g(); +void g() __attribute__((deprecated)); +void g(); // expected-note {{'g' has been explicitly marked deprecated here}} -extern int var __attribute__((deprecated)); // expected-note 2 {{'var' has been explicitly marked deprecated here}} +extern int var __attribute__((deprecated)); // expected-note {{'var' has been explicitly marked deprecated here}} int a() { int (*ptr)() = f; // expected-warning {{'f' is deprecated}} @@ -17,13 +17,13 @@ int a() { } // test if attributes propagate to variables -extern int var; +extern int var; // expected-note {{'var' has been explicitly marked deprecated here}} int w() { return var; // expected-warning {{'var' is deprecated}} } -int old_fn() __attribute__ ((deprecated));// expected-note {{'old_fn' has been explicitly marked deprecated here}} -int old_fn(); +int old_fn() __attribute__ ((deprecated)); +int old_fn(); // expected-note {{'old_fn' has been explicitly marked deprecated here}} int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}} int old_fn() { @@ -44,8 +44,8 @@ void test1(struct foo *F) { typedef struct foo foo_dep __attribute__((deprecated)); // expected-note 12 {{'foo_dep' has been explicitly marked deprecated here}} foo_dep *test2; // expected-warning {{'foo_dep' is deprecated}} -struct __attribute__((deprecated, // expected-note 2 {{'bar_dep' has been explicitly marked deprecated here}} - invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} +struct __attribute__((deprecated, + invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} expected-note 2 {{'bar_dep' has been explicitly marked deprecated here}} struct bar_dep *test3; // expected-warning {{'bar_dep' is deprecated}} @@ -121,11 +121,11 @@ struct test22 { __attribute((deprecated)) foo_dep e, f; }; -typedef int test23_ty __attribute((deprecated)); // expected-note {{'test23_ty' has been explicitly marked deprecated here}} +typedef int test23_ty __attribute((deprecated)); // Redefining a typedef is a C11 feature. #if __STDC_VERSION__ <= 199901L // expected-note@-3 {{'test23_ty' has been explicitly marked deprecated here}} #else -typedef int test23_ty; +typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}} #endif test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}} |