diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-10 18:54:32 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-10 18:54:32 +0000 |
| commit | b2f0f057421309b628d51b4c260392d228c4993a (patch) | |
| tree | a84dd329ce0b998b0c23edfd026e2c7c85156e7e /clang/lib/Sema/SemaDecl.cpp | |
| parent | 50a92304aaa558130521129ab81fc8397efd5ee0 (diff) | |
| download | bcm5719-llvm-b2f0f057421309b628d51b4c260392d228c4993a.tar.gz bcm5719-llvm-b2f0f057421309b628d51b4c260392d228c4993a.zip | |
Re-commit r283722, reverted in r283750, with a fix for a CUDA-specific use of
past-the-end iterator.
Original commit message:
P0035R4: Semantic analysis and code generation for C++17 overaligned
allocation.
llvm-svn: 283789
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); |

