Skip to content

Commit 5135dcd

Browse files
authored
[clang] NFC: remove leftover from injected class name redecl (#155959)
The code being removed became non-functional when injected class names were removed from the redecl chain in 470c454, but that commit didn't clean the code base out of all the workarounds for that state of affairs.
1 parent 396aa58 commit 5135dcd

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

clang/include/clang/AST/ASTNodeTraverser.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -649,21 +649,8 @@ class ASTNodeTraverser
649649

650650
template <typename SpecializationDecl>
651651
void dumpTemplateDeclSpecialization(const SpecializationDecl *D) {
652-
for (const auto *RedeclWithBadType : D->redecls()) {
653-
// FIXME: The redecls() range sometimes has elements of a less-specific
654-
// type. (In particular, ClassTemplateSpecializationDecl::redecls() gives
655-
// us TagDecls, and should give CXXRecordDecls).
656-
auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
657-
if (!Redecl) {
658-
// Found the injected-class-name for a class template. This will be
659-
// dumped as part of its surrounding class so we don't need to dump it
660-
// here.
661-
assert(isa<CXXRecordDecl>(RedeclWithBadType) &&
662-
"expected an injected-class-name");
663-
continue;
664-
}
665-
Visit(Redecl);
666-
}
652+
for (const auto *Redecl : D->redecls())
653+
Visit(cast<SpecializationDecl>(Redecl));
667654
}
668655

669656
template <typename TemplateDecl>

0 commit comments

Comments
 (0)