uses.
This fixes one of the two remaining failures to implement [[deprecated]]
as specified for C++14.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191572
91177308-0d34-0410-b5e6-
96231b3b80d8
Decl->setLexicalDeclContext(ClassTemplate->getLexicalDeclContext());
}
+ // Diagnose uses of this specialization.
+ (void)DiagnoseUseOfDecl(Decl, TemplateLoc);
+
CanonType = Context.getTypeDeclType(Decl);
assert(isa<RecordType>(CanonType) &&
"type of non-dependent specialization is not a RecordType");
e my_enum; // expected-warning {{'e' is deprecated}}
template <typename T> class X {};
-template <> class [[deprecated]] X<int> {};
+template <> class [[deprecated]] X<int> {}; // expected-note {{declared here}}
X<char> x1;
-X<int> x2; // FIXME: no warning!
+// FIXME: The diagnostic here could be much better by mentioning X<int>.
+X<int> x2; // expected-warning {{'X' is deprecated}}
template <typename T> class [[deprecated]] X2 {};
template <> class X2<int> {};