summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 44e8b44d7a9..aac79e9fc70 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3227,7 +3227,7 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl,
if (!Constructor)
Var->setInvalidDecl();
else {
- if (!RD->hasTrivialConstructor())
+ if (!RD->hasTrivialConstructor() || !RD->hasTrivialDestructor())
InitializeVarWithConstructor(Var, Constructor, InitType, 0, 0);
FinalizeVarWithDestructor(Var, InitType);
}
OpenPOWER on IntegriCloud