summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-12 23:34:46 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-12 23:34:46 +0000
commitbbd5e8c2cfc19b796fd407727d403bd3098791f7 (patch)
treef088f7a97c09ed5976d39adbe8a14c524da2dd3d /clang/lib/AST/DeclCXX.cpp
parentc4c3c66ff35b9e5f8f2b868b433f82e29d94759b (diff)
downloadbcm5719-llvm-bbd5e8c2cfc19b796fd407727d403bd3098791f7.tar.gz
bcm5719-llvm-bbd5e8c2cfc19b796fd407727d403bd3098791f7.zip
More toward synthesizing copy assignments. SWIP.
llvm-svn: 78861
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index e9ae7e77f04..6c4034f7872 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -168,7 +168,8 @@ CXXConstructorDecl *CXXRecordDecl::getCopyConstructor(ASTContext &Context,
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 @@ bool CXXRecordDecl::hasConstCopyAssignment(ASTContext &Context) const {
}
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;
OpenPOWER on IntegriCloud