[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 2 05:00:14 PDT 2025


================
@@ -285,3 +285,15 @@ struct j {
 };
 bool j::operator==(const j &) const = default;
 }
+
+namespace evil2 {
+  struct k {
+  };
+  
+  struct l {
+      friend bool operator==(const l& a, const l& b);
+      friend class k;
+  };
+  
+  bool operator==(const l& a, const l& b) = default;
+}
----------------
cor3ntin wrote:

Missing new line

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


More information about the cfe-commits mailing list