diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-10-15 16:58:18 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-10-15 16:58:18 +0000 |
commit | 260995b86b8895ac22da92415cea9690c6905291 (patch) | |
tree | cdd943a30d997fb2db61e84b853b7a7bd4ee92b3 /clang/test/Misc/ast-dump-attr.cpp | |
parent | 72d03bee6497a80e70ffbf43a6e28cd55bf3527b (diff) | |
download | bcm5719-llvm-260995b86b8895ac22da92415cea9690c6905291.tar.gz bcm5719-llvm-260995b86b8895ac22da92415cea9690c6905291.zip |
Adding attributes to the IndirectFieldDecl that we generate for anonymous struct/union fields. This fixes PR20930.
llvm-svn: 219807
Diffstat (limited to 'clang/test/Misc/ast-dump-attr.cpp')
-rw-r--r-- | clang/test/Misc/ast-dump-attr.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/test/Misc/ast-dump-attr.cpp b/clang/test/Misc/ast-dump-attr.cpp index 1aa6adf79b0..446f0fa692f 100644 --- a/clang/test/Misc/ast-dump-attr.cpp +++ b/clang/test/Misc/ast-dump-attr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s +// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s int TestLocation __attribute__((unused)); @@ -135,3 +135,18 @@ void func() { // CHECK-NOT: NoReturnAttr // CHECK: CXXConversionDecl{{.*}}operator void (*)() __attribute__((noreturn)) } + +namespace PR20930 { +struct S { + struct { int Test __attribute__((deprecated)); }; + // CHECK: FieldDecl{{.*}}Test 'int' + // CHECK-NEXT: DeprecatedAttr +}; + +void f() { + S s; + s.Test = 1; + // CHECK: IndirectFieldDecl{{.*}}Test 'int' + // CHECK: DeprecatedAttr +} +} |