[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 13:31:44 PDT 2024
cor3ntin wrote:
I think both CWG1900 and CW1477 can be marked as implemented with such a test
```cpp
namespace N {
struct A {
friend int f();
};
}
int N::f() { return 0; }
int N::g() { return 0; }
// expected-error at -1 {{out-of-line definition of 'g' does not match any declaration in namespace 'N'}}```
Resolved by https://eel.is/c++draft/dcl.meaning#general-3.4.sentence-2 added by p1787r6
https://github.com/llvm/llvm-project/pull/106117
More information about the cfe-commits
mailing list