diff options
| author | Erich Keane <erich.keane@intel.com> | 2017-03-21 17:49:17 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2017-03-21 17:49:17 +0000 |
| commit | 8a8f5f0f00d7c0842871f180c80883e87304f653 (patch) | |
| tree | 0894364e7dd1bb1ca78942a9e1d022578098d5c9 /clang/test/SemaObjC/warn-deprecated-implementations.m | |
| parent | a1e3d08666f4daa714218d073ab2828fd2131928 (diff) | |
| download | bcm5719-llvm-8a8f5f0f00d7c0842871f180c80883e87304f653.tar.gz bcm5719-llvm-8a8f5f0f00d7c0842871f180c80883e87304f653.zip | |
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
llvm-svn: 298410
Diffstat (limited to 'clang/test/SemaObjC/warn-deprecated-implementations.m')
| -rw-r--r-- | clang/test/SemaObjC/warn-deprecated-implementations.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaObjC/warn-deprecated-implementations.m b/clang/test/SemaObjC/warn-deprecated-implementations.m index 6e208b5be79..4ef45b48355 100644 --- a/clang/test/SemaObjC/warn-deprecated-implementations.m +++ b/clang/test/SemaObjC/warn-deprecated-implementations.m @@ -28,8 +28,8 @@ - (void) G {} // No warning, implementing its own deprecated method @end -__attribute__((deprecated)) -@interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{'CL' has been explicitly marked deprecated here}} +__attribute__((deprecated)) // expected-note 2 {{'CL' has been explicitly marked deprecated here}} +@interface CL // expected-note 2 {{class declared here}} @end @implementation CL // expected-warning {{Implementing deprecated class}} |

