[clang] [clang] Don't add built-in operator candidates that can't be viable (PR #227584)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 30 01:15:51 PDT 2026


================
@@ -9536,6 +9552,11 @@ class BuiltinOperatorOverloadBuilder {
   ArrayRef<Expr *> Args;
   QualifiersAndAtomic VisibleTypeConversionsQuals;
   bool HasArithmeticOrEnumeralCandidateType;
+  // Whether the candidates that only have arithmetic or vector parameter types
+  // can be viable: HasArithmeticOrEnumeralCandidateType is set, and every
+  // argument might convert to such a type. Nothing looks at non-viable builtin
+  // candidates, so these candidates are only added if this is set.
----------------
zmodem wrote:

The sentence structure makes this difficult to parse. It's not entirely clear what the colon implies, and what "these candidates" refers to.

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


More information about the cfe-commits mailing list