================ @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s +// expected-no-diagnostics + +// Ensure the following out of line friend declaration doesn't cause the compiler to crash. + +class A { + friend bool operator==(const A&, const A&); + friend class B; +}; + +bool operator==(const A&, const A&) = default; + ---------------- cor3ntin wrote:
I found a couple additional tests that are interesting (the second of which happens to crash gcc) https://compiler-explorer.com/z/eb6PeP6ar https://github.com/llvm/llvm-project/pull/121056 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits