summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-27 22:06:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-27 22:06:20 +0000
commita1ce1f80cfb09e75b32d1a34d323a9cddcec744c (patch)
treecd5081cd11ba0a9adbf5c3ec981bb49b65a218d6 /clang/lib/Sema/SemaDecl.cpp
parent96bfb50c035b9b9e4a9c1dc1badda780678d6cb9 (diff)
downloadbcm5719-llvm-a1ce1f80cfb09e75b32d1a34d323a9cddcec744c.tar.gz
bcm5719-llvm-a1ce1f80cfb09e75b32d1a34d323a9cddcec744c.zip
Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. llvm-svn: 114899
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 48e36a9dc47..48beca71cf0 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -544,7 +544,9 @@ static bool IsDisallowedCopyOrAssign(const CXXMethodDecl *D) {
if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(D))
return CD->isCopyConstructor();
- return D->isCopyAssignment();
+ if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D))
+ return Method->isCopyAssignmentOperator();
+ return false;
}
bool Sema::ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const {
OpenPOWER on IntegriCloud