[llvm-branch-commits] [clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)
Matheus Izvekov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 19 11:36:04 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}}
----------------
mizvekov wrote:
> I'm not certain I understand the concern then. The request is to do something like:
> so either way it is actually checking the whole diagnostic sequence, just that with bookmarks it's easier to tell which warnings/errors generate what notes.
No it's not actually checking the sequence, because the notes can be attached to random diagnostics which are not actually the preceding ones, and the tests will still pass.
The diagnostic verifier does not currently check the order diagnostics appear in, writing the test expectations like this only gives you the illusion that it does :)
https://github.com/llvm/llvm-project/pull/126088
More information about the llvm-branch-commits
mailing list