hokein added a comment. I think we also want to update the ast dumper bit: https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ASTDumper.cpp#L94-L100
================ Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1841-1842 + /*DelayTypeCreation=*/IsInjectedClassName); + if (IsInjectedClassName) + SemaRef.Context.getTypeDeclType(Record, cast<CXXRecordDecl>(Owner)); ---------------- aaron.ballman wrote: > Why is this call needed? (It seems strange to me that we call it and ignore > the return value.) my understanding is - `getTypeDeclType` is more than a getter, it also has a side-effort -- if the type of the passed `Record` is empty, it creates a type, and propagates the type to `Record->TypeForDecl`; - from the above line, we delay the type creation when `IsInjectedClassName` is true; - so we need to create a type for the `Record` by invoking `getTypeDeclType`; might be worth a comment. ================ Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1910 + if (IsInjectedClassName) + assert(Record->isInjectedClassName() && "Broken injected-class-name"); ---------------- it is unclear to me what's the intention of the assertion. 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