llvm-project/clang/test/CXX/dcl.dcl/dcl.attr
Erich Keane a32910da1a Correct class-template deprecation behavior-REDUX
Correct class-template deprecation behavior

Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case:
template<typename T> [[deprecated]] class Foo{}; Foo<int> f;

This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute.

Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute.

Previous DiffRev: https://reviews.llvm.org/D27486, was reverted.
This patch fixes the issues brought up here by the reverter: https://reviews.llvm.org/rL298410

Differential Revision: https://reviews.llvm.org/D31245

llvm-svn: 298634
2017-03-23 18:51:54 +00:00
..
dcl.align
dcl.attr.depend
dcl.attr.deprecated Correct class-template deprecation behavior-REDUX 2017-03-23 18:51:54 +00:00
dcl.attr.fallthrough Add accidentally forgotten testcase from r262881. 2016-03-08 00:34:49 +00:00
dcl.attr.grammar Using for attributes voted into C++17. 2016-06-24 12:15:12 +00:00
dcl.attr.nodiscard Readd testcase accidentally removed in r262888. 2016-03-09 00:12:38 +00:00
dcl.attr.noreturn
dcl.attr.unused Implement support for [[maybe_unused]] in C++1z that is based off existing support for unused, and treat it as an extension pre-C++1z. This also means extending the existing unused attribute so that it can be placed on an enum and enumerator, in addition to the other subjects. 2016-03-09 16:48:08 +00:00