[compiler-rt] Replace bool operator== for VersionType in sanitizer_mac.h (PR #135068)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 12:15:08 PDT 2025


================
@@ -37,8 +37,8 @@ struct VersionBase {
 
   VersionBase(u16 major, u16 minor) : major(major), minor(minor) {}
 
-  bool operator==(const VersionType &other) const {
-    return major == other.major && minor == other.minor;
+  friend bool operator==(const VersionType &self, const VersionType &other) {
----------------
vitalybuka wrote:

fields are public, it does not need need to be fried or even a member

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


More information about the llvm-commits mailing list