summaryrefslogtreecommitdiff
path: root/test/SemaObjC/attr-deprecated.m
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-03-21 17:49:17 +0000
committerErich Keane <erich.keane@intel.com>2017-03-21 17:49:17 +0000
commitc1312361da3eb9d40a6b7dd770e7bace2a79e7fb (patch)
tree47eaac26cd2cc24d74ee19e35a4cb1685f78570a /test/SemaObjC/attr-deprecated.m
parent9bd00f207cc73a964015de302fe002c4a94298e1 (diff)
downloadclang-c1312361da3eb9d40a6b7dd770e7bace2a79e7fb.tar.gz
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
Diffstat (limited to 'test/SemaObjC/attr-deprecated.m')
-rw-r--r--test/SemaObjC/attr-deprecated.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m
index 59087bdf11..229fc6bab7 100644
--- a/test/SemaObjC/attr-deprecated.m
+++ b/test/SemaObjC/attr-deprecated.m
@@ -83,8 +83,8 @@ int t5() {
}
-__attribute ((deprecated))
-@interface DEPRECATED { // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}}
+__attribute ((deprecated)) // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}}
+@interface DEPRECATED {
@public int ivar;
DEPRECATED *ivar2; // no warning.
}