summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2013-06-21 18:58:32 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2013-06-21 18:58:32 +0000
commit76d0b46dd1af454de6fb3902a249ff19e61d568a (patch)
tree325cb48c2602bc2822a9749ac332aa20cb6e92ba /clang/lib/Sema/SemaTemplateInstantiate.cpp
parentc972c70e6097addb1255f602cdc4ae20a3e560d8 (diff)
downloadbcm5719-llvm-76d0b46dd1af454de6fb3902a249ff19e61d568a.tar.gz
bcm5719-llvm-76d0b46dd1af454de6fb3902a249ff19e61d568a.zip
Propagate the invalid bit from bases to derived template classes.
Fixes PR16292. llvm-svn: 184581
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 5e3ced47f44..9babafedc95 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1754,6 +1754,10 @@ Sema::SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
Base = Pattern->bases_begin(), BaseEnd = Pattern->bases_end();
Base != BaseEnd; ++Base) {
if (!Base->getType()->isDependentType()) {
+ if (const CXXRecordDecl *RD = Base->getType()->getAsCXXRecordDecl()) {
+ if (RD->isInvalidDecl())
+ Instantiation->setInvalidDecl();
+ }
InstantiatedBases.push_back(new (Context) CXXBaseSpecifier(*Base));
continue;
}
OpenPOWER on IntegriCloud