Martin =?utf-8?q?Bednár?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -90,3 +91,148 @@ void func(void) {
 // CHECK: CompoundAssignOperator=^= BinOp=^= 31
 // CHECK: CompoundAssignOperator=|= BinOp=|= 32
 // CHECK: BinaryOperator=, BinOp=, 33
+
+struct D {
+  D() = default;
+  D& operator+(){return *this;}
+  D& operator-(){return *this;}
+  D& operator*(const D&){return *this;}
+  D& operator/(const D&){return *this;}
+  D& operator%(const D&){return *this;}
+  D& operator+(const D&){return *this;}
+  D& operator-(const D&){return *this;}
+
+  D& operator<<(const D&){return *this;}
+  D& operator>>(const D&){return *this;}
+
+  bool operator<(const D&){return true;}
+  bool operator>(const D&){return true;}
+  bool operator<=(const D&){return true;}
+  bool operator>=(const D&){return true;}
+  bool operator==(const D&){return true;}
+  bool operator!=(const D&){return true;}
+
+  D& operator|(const D&){return *this;}
+  D& operator&(const D&){return *this;}
+  D& operator^(const D&){return *this;}
+
+  bool operator&&(const D&){return true;}
+  bool operator||(const D&){return true;}
+
+  D& operator+=(const D&){return *this;}
+  D& operator-=(const D&){return *this;}
+  D& operator*=(const D&){return *this;}
+  D& operator/=(const D&){return *this;}
+  D& operator%=(const D&){return *this;}
+  D& operator&=(const D&){return *this;}
+  D& operator|=(const D&){return *this;}
+  D& operator^=(const D&){return *this;}
+  D& operator<<=(const D&){return *this;}
+  D& operator>>=(const D&){return *this;}
+  D& operator,(const D&){return *this;}
+
----------------
AaronBallman wrote:

We should probably also have a C++20 test case involving the spaceship operator 
and rewritten (generated) binary operators that it uses.

https://github.com/llvm/llvm-project/pull/182303
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to