================ @@ -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; + ---------------- GrumpyPigSkin wrote:
Ahh okay, what is the other test? I was messing around and found a test that passes on clang and fails on gcc/msvc, https://compiler-explorer.com/z/5ve41Mo9b, I don't see why it shouldn't pass on the other two. What other tests do you think are worth implementing? 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