llvm-project
616613c8 - [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (#135679)

Commit
243 days ago
[Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (#135679) NB: This only fixes the crash introduced in Clang 19; we still accept this code even though we shouldn’t: ```c++ struct S { friend int f() { return 3; } friend int f() = delete; }; ``` I tried figuring out a way to diagnose this redeclaration, but it seems tricky because I kept running into issues around defaulted comparison operators. From my testing, however, this fix here would still be required even once we do start diagnosing this. Fixes #135506.
Author
Parents
Loading