// RUN: %clang_cc1 %s -verify -fsyntax-only
// RUN: %clang_cc1 %s -std=c89 -verify -fsyntax-only
// RUN: %clang_cc1 %s -std=c99 -verify -fsyntax-only
int ; // expected-note 2 {{'f' has been explicitly marked deprecated here}}
void ;// expected-note {{'g' has been explicitly marked deprecated here}}
void ;
extern int var ; // expected-note 2 {{'var' has been explicitly marked deprecated here}}
int
// test if attributes propagate to variables
extern int var;
int
int ;// expected-note {{'old_fn' has been explicitly marked deprecated here}}
int ;
= old_fn; // expected-warning {{'old_fn' is deprecated}}
int
;
void
typedef struct foo foo_dep ; // expected-note 12 {{'foo_dep' has been explicitly marked deprecated here}}
foo_dep *test2; // expected-warning {{'foo_dep' is deprecated}}
; // expected-warning {{unknown attribute 'invalid_attribute' ignored}}
struct bar_dep *test3; // expected-warning {{'bar_dep' is deprecated}}
// These should not warn because the actually declaration itself is deprecated.
// rdar://6756623
foo_dep *test4 ;
struct bar_dep *test5 ;
typedef foo_dep ; // expected-warning {{'foo_dep' is deprecated}} \
// expected-warning {{'bar_dep' is deprecated}}
typedef foo_dep ;
int
foo_dep *;
foo_dep *
void ;
void
char test11 ;
char test12; // expected-warning {{'foo_dep' is deprecated}}
int ;
int ; // expected-warning {{'foo_dep' is deprecated}}
unsigned long test15 = sizeof; // expected-warning {{'foo_dep' is deprecated}}
unsigned long test16
= sizeof;
foo_dep test17, // expected-warning {{'foo_dep' is deprecated}}
test18 ,
test19;
// rdar://problem/8518751
;
void
char test21;
;
typedef int test23_ty ;
// Redefining a typedef is a C11 feature.
// expected-note@-3 {{'test23_ty' has been explicitly marked deprecated here}}
// expected-note@-5 {{'test23_ty' has been explicitly marked deprecated here}}
typedef int test23_ty;
test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}