aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorMartin Boehme <mboehme@google.com>2022-06-28 08:50:59 +0200
committerMartin Boehme <mboehme@google.com>2022-06-28 08:52:58 +0200
commit86866107b89c0515d197ec70292ce776bce5a04b (patch)
treea46526e55bcf642953b022337d9f44f906b6ff1a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent527ef8ca981e88a35758c0e4143be6853ea26dfc (diff)
downloadllvm-86866107b89c0515d197ec70292ce776bce5a04b.zip
llvm-86866107b89c0515d197ec70292ce776bce5a04b.tar.gz
llvm-86866107b89c0515d197ec70292ce776bce5a04b.tar.bz2
[Clang] Fix: Restore warning inadvertently removed by D126061.
Before D126061, Clang would warn about this code ``` struct X { [[deprecated]] struct Y {}; }; ``` with the warning attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration D126061 inadvertently caused this warning to no longer be emitted. This patch restores the previous behavior. The reason for the bug is that after D126061, C++11 attributes applied to a member declaration are no longer placed in `DS.getAttributes()` but are instead tracked in a separate list (`DeclAttrs`). In the case of a free-standing decl-specifier-seq, we would simply ignore the contents of this list. Instead, we now pass the list on to `Sema::ParsedFreeStandingDeclSpec()` so that it can issue the appropriate warning. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D128499
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions