From 3e7df27c1d3a9c1a430b2cf471517f8f059d59ed Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 9 Apr 2025 21:08:00 -0700 Subject: [PATCH] Revert "Fix ambiguous reversed operator error in sanitizer_mac.h (#135068)" This reverts commit 433a63e117ebf22365ef1f3f595a49cbe9f0c88e. --- compiler-rt/lib/sanitizer_common/sanitizer_mac.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.h b/compiler-rt/lib/sanitizer_common/sanitizer_mac.h index 4de0605e18f03..f0a97d098eea0 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.h @@ -37,6 +37,9 @@ struct VersionBase { VersionBase(u16 major, u16 minor) : major(major), minor(minor) {} + bool operator==(const VersionType &other) const { + return major == other.major && minor == other.minor; + } bool operator>=(const VersionType &other) const { return major > other.major || (major == other.major && minor >= other.minor); @@ -44,11 +47,6 @@ struct VersionBase { bool operator<(const VersionType &other) const { return !(*this >= other); } }; -template -bool operator==(const VersionType &self, const VersionType &other) { - return self.major == other.major && self.minor == other.minor; -} - struct MacosVersion : VersionBase { MacosVersion(u16 major, u16 minor) : VersionBase(major, minor) {} };