hanchenye-llvm-project/clang/test/CXX
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
..
basic Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
class Fix all tests under test/CXX (and test/Analysis) to pass if clang's default 2016-08-31 23:24:08 +00:00
class.access Fix all tests under test/CXX (and test/Analysis) to pass if clang's default 2016-08-31 23:24:08 +00:00
class.derived Add context note to diagnostics that occur while declaring an implicit special member function. 2017-02-23 21:43:43 +00:00
concepts-ts [Concepts] Class template associated constraints 2017-02-10 02:46:19 +00:00
conv [c++1z] P0003R5: Removing dynamic exception specifications. 2016-12-08 02:49:07 +00:00
cpp/cpp.predefined P0035R4: add predefined __STDCPP_DEFAULT_NEW_ALIGNMENT__ macro. By default, we 2016-09-30 22:41:36 +00:00
dcl.dcl Correct class-template deprecation behavior-REDUX 2017-03-23 18:51:54 +00:00
dcl.decl [Sema] Add lvalue-to-rvalue cast in direct-list-initialization of enum 2017-02-16 01:20:00 +00:00
drs Implement DR 373 "Lookup on namespace qualified name in using-directive" 2017-03-17 21:41:20 +00:00
except P0012R1: Make exception specifications be part of the type system. This 2016-10-16 17:54:23 +00:00
expr [c++1z] Synthesize implicit deduction guides from constructors on demand. Rank 2017-02-14 00:25:28 +00:00
lex
over [c++1z] Add some more tests for class template argument deduction, add 2017-02-14 00:55:25 +00:00
special [Sema] Improve the error diagnostic for dot destructor calls on pointer objects 2017-01-20 15:38:58 +00:00
stmt.stmt Try contextually converting condition of constexpr if to Boolean value 2016-09-07 18:24:54 +00:00
temp [c++1z] Add some more tests for class template argument deduction, add 2017-02-14 00:55:25 +00:00