More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index e9ae7e7..6c4034f 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -168,7 +168,8 @@
   return 0;
 }
 
-bool CXXRecordDecl::hasConstCopyAssignment(ASTContext &Context) const {
+bool CXXRecordDecl::hasConstCopyAssignment(ASTContext &Context,
+                                           const CXXMethodDecl *& MD) const {
   QualType ClassType = Context.getCanonicalType(Context.getTypeDeclType(
     const_cast<CXXRecordDecl*>(this)));
   DeclarationName OpName =Context.DeclarationNames.getCXXOperatorName(OO_Equal);
@@ -200,7 +201,7 @@
     }
     if (Context.getCanonicalType(ArgType).getUnqualifiedType() != ClassType)
       continue;
-
+    MD = Method;
     // We have a single argument of type cv X or cv X&, i.e. we've found the
     // copy assignment operator. Return whether it accepts const arguments.
     return AcceptsConst;