[llvm-branch-commits] [clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

Vlad Serebrennikov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 6 09:49:31 PST 2025


================
@@ -1018,9 +1019,9 @@ namespace cwg62 { // cwg62: 2.9
   struct A {
     struct { int n; } b;
   };
-  template<typename T> struct X {};
-  template<typename T> T get() { return get<T>(); }
-  template<typename T> int take(T) { return 0; }
+  template<typename T> struct X {}; // cxx98-note 6{{template parameter is declared here}}
----------------
Endilll wrote:

Those notes have to be places together with their respective errors, one by one, without matching for multiple notes with one expected directive.

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


More information about the llvm-branch-commits mailing list