diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-09-27 22:06:20 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-09-27 22:06:20 +0000 |
| commit | a1ce1f80cfb09e75b32d1a34d323a9cddcec744c (patch) | |
| tree | cd5081cd11ba0a9adbf5c3ec981bb49b65a218d6 /clang/lib/Sema/SemaDecl.cpp | |
| parent | 96bfb50c035b9b9e4a9c1dc1badda780678d6cb9 (diff) | |
| download | bcm5719-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.cpp | 4 |
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 { |

