https://llvm.org/bugs/show_bug.cgi?id=31297
Bug ID: 31297 Summary: [[deprecated]] warning doesn't work on templates Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: erich.ke...@intel.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified So, the following code will only emit a 2 warnings (1st and 3rd), rather than all 3: struct [[deprecated]] no_template{}; template<typename T> struct [[deprecated]] with_template{}; template<> struct [[deprecated]] with_template<float>{}; int main() { no_template x1; // Warns appropriately with_template<int> x2; // Does NOT warn! with_template<float> x3; // Warns appropriately } Note that the specialization isn't necessary to suppress the 2nd warning. I briefly have been attempting to debug this, and don't really see any attempts to make it work for the template situation. So, I have 2 questions: 1- Is this done intentionally for standards compliance? I don't see any reason why a template function SHOULDN'T accept deprecated. 2- If this is something we want, can anyone provide guidance as to where I can start to implement this? I don't mind taking it, I just don't really have a good idea where to start. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs