When traversing a TemplateDecl, ts can be a dependent type

Change-Id: I05b02ef807a12a802720f58cd5a2d6d370b42418
This commit is contained in:
Stephan Bergmann 2017-09-05 09:38:30 +02:00
parent 37fb289614
commit 4f2bc21685

View File

@ -108,7 +108,9 @@ public:
ts = t->getPointeeType();
}
auto const rts = ts->getAs<RecordType>();
assert(rts != nullptr);
if (rts == nullptr) { // in case it's a dependent type
return true;
}
auto const rds = cast<CXXRecordDecl>(rts->getDecl())->getDefinition();
assert(rds != nullptr);
Bases bs;