[clang] [Clang] Copy initialization of an object of the same type should not consider user-defined conversions (PR #185936)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 10:33:58 PDT 2026


================
@@ -4689,6 +4689,18 @@ static void TryConstructorInitialization(Sema &S,
     }
   }
 
+  // if the initialization is direct-initialization, or if it is
+  // copy-initialization where the cv-unqualified version of the source type is
+  // the same as or is derived from the class of the destination type,
+  // constructors are considered. The
----------------
erichkeane wrote:

```suggestion
  // constructors are considered.
```

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


More information about the cfe-commits mailing list