[clang] [SemaCXX] Fixed defaulted equality operator deletion issue (#97087)[SemaCXX] Fix defaulted equality operator being incorrectly deleted when using namespace (llvm#97087) (PR #166996)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 19 18:53:24 PST 2025


================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
+// expected-no-diagnostics
+
+struct X {};
+namespace NS {
+    bool operator==(X, X);
+}
+using namespace NS;
+struct Y {
+    X x;
+    friend bool operator==(Y, Y);
+};
+bool operator==(Y, Y) = default;
----------------
erichkeane wrote:

newline needed here.

https://github.com/llvm/llvm-project/pull/166996


More information about the cfe-commits mailing list