[clang] [clang] fix crash in friend definition (PR #186398)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 12:08:01 PDT 2026
Serosh-commits wrote:
> The problem here looks fairly simple to understand what goes wrong. Example:
>
> ```c++
> struct X {
> void f2();
> };
> struct Y {
> friend void X::f2() {}
> };
> ```
>
> Your logic for filtering the diagnostic based on the nested name specifier being of namespace / global kind only is not right, as this case otherwise does not get covered by any diagnostics later.
<img width="841" height="565" alt="image" src="https://github.com/user-attachments/assets/8dae2391-7e34-488d-9535-89f6b37e3b0c" />
oh shoot i actually thought that and asked u that must be the problem to make sure but yeah i didn't realised i can't review
yeah u are right let me refactor it thanks for ur review
https://github.com/llvm/llvm-project/pull/186398
More information about the cfe-commits
mailing list