[clang] [CIR] Implement isMemcpyEquivalentSpecialMember for trivial copy/move ctors (PR #186700)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 06:44:57 PDT 2026


================
@@ -3834,6 +3834,10 @@ OPT_LIST(V)
 
   StringRef getCUIDHash() const;
 
+  /// Returns whether D is a copy/move constructor or assignment operator
+  /// that can be implemented as a memcpy of the object representation.
+  bool isMemcpyEquivalentSpecialMember(const CXXMethodDecl *D) const;
----------------
erichkeane wrote:

I think I'd rather this on the `CXXMethodDecl` instead.  Asking `ASTContext` here is the wrong place.

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


More information about the cfe-commits mailing list