hokein accepted this revision. hokein added a comment. looks good, thanks.
================ Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:1685 - // We don't want to visit injected-class-names in this traversal. - if (cast<CXXRecordDecl>(RD)->isInjectedClassName()) - continue; ---------------- I would add a assertion here: `assert(!cast<CXXRecordDecl>(RD)->isInjectedClassName())`. ================ Comment at: clang/lib/AST/ASTDumper.cpp:94 auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType); - if (!Redecl) { - // Found the injected-class-name for a class template. This will be dumped ---------------- `assert(Redecl)` ================ Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1910 + if (IsInjectedClassName) + assert(Record->isInjectedClassName() && "Broken injected-class-name"); ---------------- sammccall wrote: > hokein wrote: > > it is unclear to me what's the intention of the assertion. > We needed to do a few weird things (and to assume some things about the > input) to initialize the injected-class-name, it verifies we got them all > right. > > (This assertion is also in ActOnStartCXXMemberDeclarations()) ok, I see. didn't know this is derived from `ActOnStartCXXMemberDeclarations`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112765/new/ https://reviews.llvm.org/D112765 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits