diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-11-01 04:52:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-11-01 04:52:12 +0000 |
commit | 2276925224353681293a6a8ff6758a984d9c2e1c (patch) | |
tree | dade4e02dad72e3561fd4bc63c472956f6d4ede9 /lib/Sema/Sema.cpp | |
parent | 23966147d547ba36deb4726e5c09d680fedb8909 (diff) | |
download | clang-2276925224353681293a6a8ff6758a984d9c2e1c.tar.gz |
Fix -Wunused-private-field to fire regardless of which implicit special members have been implicitly declared.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 58bca42677..31400e1de8 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -737,7 +737,8 @@ static bool MethodsAndNestedClassesComplete(const CXXRecordDecl *RD, E = RD->decls_end(); I != E && Complete; ++I) { if (const CXXMethodDecl *M = dyn_cast<CXXMethodDecl>(*I)) - Complete = M->isDefined() || (M->isPure() && !isa<CXXDestructorDecl>(M)); + Complete = M->isDefined() || M->isDefaulted() || + (M->isPure() && !isa<CXXDestructorDecl>(M)); else if (const FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(*I)) // If the template function is marked as late template parsed at this // point, it has not been instantiated and therefore we have not |