Skip to content

Commit 654359e

Browse files
Smit1603vgvassilev
authored andcommitted
Remove dead code since TemplateSpecializationType is a subclass for RecordType
1 parent 1fd3ae4 commit 654359e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -614,13 +614,8 @@ namespace Cpp {
614614
if (!CXXRD || CXXRD->getNumBases() <= ibase) return 0;
615615

616616
auto type = (CXXRD->bases_begin() + ibase)->getType();
617-
if (auto RT = type->getAs<RecordType>()) {
618-
return (TCppScope_t) RT->getDecl();
619-
} else if (auto TST = type->getAs<clang::TemplateSpecializationType>()) {
620-
TemplateName TN = TST->getTemplateName();
621-
if (auto *TD = dyn_cast_or_null<ClassTemplateDecl>(TN.getAsTemplateDecl()))
622-
return TD->getTemplatedDecl();
623-
}
617+
if (auto RT = type->getAs<RecordType>())
618+
return (TCppScope_t)RT->getDecl();
624619

625620
return 0;
626621
}

0 commit comments

Comments
 (0)