[clang] Add bit-precise overloads for builtin operators (PR #84755)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 06:42:53 PDT 2024


================
@@ -8955,6 +8962,22 @@ class BuiltinOperatorOverloadBuilder {
         (S.Context.getAuxTargetInfo() &&
          S.Context.getAuxTargetInfo()->hasInt128Type()))
       ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty);
+
+    /// _BitInt overloads are a bit special. We don't want to add candidates
+    /// for the entire family of _BitInt types, so instead we only add
+    /// candidates for the unique, unqualified _BitInt types present in the
+    /// candidate type set. The candidate set already handled ensuring the type
----------------
cor3ntin wrote:

This comment is a bit weird imo. "We don't want to add candidates for the entire family of _BitInt types" seems a bit obvious (and if we wanted to do that, wouldn't we need a lot more special handling any way?

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


More information about the cfe-commits mailing list