aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 44e8b44d7a..aac79e9fc7 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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);
}