[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 05:50:26 PDT 2024
================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only %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;
----------------
Endilll wrote:
I think both tests should be put into `clang/test/SemaCXX/cxx20-default-compare.cpp` instead of creating a new file.
https://github.com/llvm/llvm-project/pull/99542
More information about the cfe-commits
mailing list