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. Differential Revision: https://reviews.llvm.org/D27486 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298410 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/Attr.td 6 additions, 0 deletionsinclude/clang/Basic/Attr.td
- include/clang/Sema/Sema.h 6 additions, 0 deletionsinclude/clang/Sema/Sema.h
- lib/Sema/SemaDeclAttr.cpp 4 additions, 1 deletionlib/Sema/SemaDeclAttr.cpp
- lib/Sema/SemaTemplate.cpp 7 additions, 0 deletionslib/Sema/SemaTemplate.cpp
- lib/Sema/SemaTemplateInstantiate.cpp 3 additions, 0 deletionslib/Sema/SemaTemplateInstantiate.cpp
- lib/Sema/SemaTemplateInstantiateDecl.cpp 31 additions, 1 deletionlib/Sema/SemaTemplateInstantiateDecl.cpp
- test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp 34 additions, 3 deletionstest/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
- test/Sema/attr-deprecated.c 10 additions, 10 deletionstest/Sema/attr-deprecated.c
- test/SemaCXX/attr-deprecated.cpp 6 additions, 6 deletionstest/SemaCXX/attr-deprecated.cpp
- test/SemaObjC/attr-deprecated.m 2 additions, 2 deletionstest/SemaObjC/attr-deprecated.m
- test/SemaObjC/special-dep-unavail-warning.m 2 additions, 2 deletionstest/SemaObjC/special-dep-unavail-warning.m
- test/SemaObjC/warn-deprecated-implementations.m 2 additions, 2 deletionstest/SemaObjC/warn-deprecated-implementations.m
- utils/TableGen/ClangAttrEmitter.cpp 28 additions, 16 deletionsutils/TableGen/ClangAttrEmitter.cpp
Loading
Please register or sign in to comment