summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-10-10 18:54:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-10-10 18:54:32 +0000
commitb2f0f057421309b628d51b4c260392d228c4993a (patch)
treea84dd329ce0b998b0c23edfd026e2c7c85156e7e /clang/lib/Sema/SemaDecl.cpp
parent50a92304aaa558130521129ab81fc8397efd5ee0 (diff)
downloadbcm5719-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.cpp8
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);
OpenPOWER on IntegriCloud