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.
It's surprising that we don't need to update this interface as well; is that inconsistency desired?