diff options
Diffstat (limited to 'clang/test/Sema/anonymous-struct-union.c')
-rw-r--r-- | clang/test/Sema/anonymous-struct-union.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/anonymous-struct-union.c b/clang/test/Sema/anonymous-struct-union.c index 26dbeb87f5f..652383eabb7 100644 --- a/clang/test/Sema/anonymous-struct-union.c +++ b/clang/test/Sema/anonymous-struct-union.c @@ -108,3 +108,13 @@ struct s { struct { int i; }; int a[]; }; + +// PR20930 +struct s3 { + struct { int A __attribute__((deprecated)); }; // expected-note {{'A' has been explicitly marked deprecated here}} +}; + +void deprecated_anonymous_struct_member(void) { + struct s3 s; + s.A = 1; // expected-warning {{'A' is deprecated}} +} |