[clang] [Clang] Check explicit object parameter for defaulted operators properly (PR #100419)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 11:15:32 PDT 2024


================
@@ -92,6 +92,26 @@ using ::cwg2521::operator""_div;
 #endif
 } // namespace cwg2521
 
+namespace cwg2547 { // cwg2547: 20
+#if __cplusplus >= 202302L
+struct S; // since-cxx23-note 3 {{forward declaration of 'cwg2547::S'}}
+bool operator==(S, S) = default;  // error: S is not complete
+// since-cxx23-error at -1 2 {{variable has incomplete type 'S'}}
----------------
Endilll wrote:

```suggestion
// since-cxx23-error at -1 {{variable has incomplete type 'S'}}
// since-cxx23-error at -2 {{variable has incomplete type 'S'}}
```
We don't use diagnostic quantifiers in DR test suite

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


More information about the cfe-commits mailing list