summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/Sema.cpp2
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index ca69d69959c..60cfd47e0f0 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -290,6 +290,8 @@ void Sema::ActOnEndOfTranslationUnit() {
// this translation unit, then those vtables are considered "used" and must
// be emitted.
for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) {
+ assert(!DynamicClasses[I]->isDependentType() &&
+ "Should not see dependent types here!");
if (const CXXMethodDecl *KeyFunction
= Context.getKeyFunction(DynamicClasses[I])) {
const FunctionDecl *Definition = 0;
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 25d0a5effed..d5dea782306 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2746,7 +2746,7 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
}
}
- if (Record->isDynamicClass())
+ if (Record->isDynamicClass() && !Record->isDependentType())
DynamicClasses.push_back(Record);
if (Record->getIdentifier()) {
OpenPOWER on IntegriCloud