[clang] [clang] Diagnose use of deprecated template alias (PR #97619)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 11:33:16 PDT 2024


================
@@ -0,0 +1,58 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+//
+// This test checks that a deprecated attribute on an alias
+// template triggers a warning diagnostic when it is used.
+
+template <typename T>
+struct NoAttr {
+  void foo() {}
+};
+
+// expected-note at +2 5{{'UsingWithAttr' has been explicitly marked deprecated here}}
+template <typename T>
+using UsingWithAttr __attribute__((deprecated)) = NoAttr<T>;
----------------
premanandrao wrote:

Thank you @tahonermann!  Done.

https://github.com/llvm/llvm-project/pull/97619


More information about the cfe-commits mailing list