summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/warn-deprecated-implementations.m
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-03-23 18:51:54 +0000
committerErich Keane <erich.keane@intel.com>2017-03-23 18:51:54 +0000
commita32910da1ac5f7c3a2a97d1e5e2050cebe109ae7 (patch)
tree1fe265e3a57a7b15191170fe17e15218b8b382aa /clang/test/SemaObjC/warn-deprecated-implementations.m
parent9ebefeb9b1ee22c3ad5036dad131cb960d709662 (diff)
downloadbcm5719-llvm-a32910da1ac5f7c3a2a97d1e5e2050cebe109ae7.tar.gz
bcm5719-llvm-a32910da1ac5f7c3a2a97d1e5e2050cebe109ae7.zip
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
Diffstat (limited to 'clang/test/SemaObjC/warn-deprecated-implementations.m')
-rw-r--r--clang/test/SemaObjC/warn-deprecated-implementations.m4
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 f5a010da3fa..0c341165b0f 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}}
OpenPOWER on IntegriCloud