[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 02:20:06 PDT 2024
================
@@ -597,9 +597,10 @@ namespace cwg336 { // cwg336: yes
void mf2();
};
};
- template<> template<class X> class A<int>::B {};
+ template<> template<class X> class A<int>::B {}; // #defined-here-cwg336
template<> template<> template<class T> void A<int>::B<double>::mf1(T t) {}
// expected-error at -1 {{out-of-line definition of 'mf1' does not match any declaration in 'cwg336::Pre::A<int>::B<double>'}}
+ // expected-note@#defined-here-cwg336 {{defined here}}
----------------
Endilll wrote:
```suggestion
// expected-note@#cwg336-B {{defined here}}
```
https://github.com/llvm/llvm-project/pull/110638
More information about the cfe-commits
mailing list