diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-10 06:42:31 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-10 06:42:31 +0000 |
| commit | 189e52fcdfc3c3d04a3812cab72c968ca1911378 (patch) | |
| tree | bbae468c3758adeb5625557d60fe2750e1d7609d /clang/lib/Sema/SemaDecl.cpp | |
| parent | ed84f4abd47efd2a3e1d810eacdc06963432f48f (diff) | |
| download | bcm5719-llvm-189e52fcdfc3c3d04a3812cab72c968ca1911378.tar.gz bcm5719-llvm-189e52fcdfc3c3d04a3812cab72c968ca1911378.zip | |
P0035R4: Semantic analysis and code generation for C++17 overaligned
allocation.
llvm-svn: 283722
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 32201c99d3d..7baa85a6464 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -14368,6 +14368,14 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, if (!Completed) Record->completeDefinition(); + // We may have deferred checking for a deleted destructor. Check now. + if (CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(Record)) { + auto *Dtor = CXXRecord->getDestructor(); + if (Dtor && Dtor->isImplicit() && + ShouldDeleteSpecialMember(Dtor, CXXDestructor)) + SetDeclDeleted(Dtor, CXXRecord->getLocation()); + } + if (Record->hasAttrs()) { CheckAlignasUnderalignment(Record); |

