summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 7693e144ba2..db81e48f1da 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -1658,6 +1658,11 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor,
continue;
CXXRecordDecl *BaseClassDecl =
cast<CXXRecordDecl>(RT->getDecl());
+
+ // We don't know if a dependent type will have an implicit destructor.
+ if (BaseClassDecl->isDependentType())
+ continue;
+
if (BaseClassDecl->hasTrivialDestructor())
continue;
CXXDestructorDecl *DD = BaseClassDecl->getDestructor(Context);
OpenPOWER on IntegriCloud