[clang-tools-extra] [clang-doc] mangle specialization file names (PR #144617)
Erick Velez via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 18 09:37:12 PDT 2025
================
@@ -909,6 +910,13 @@ emitInfo(const RecordDecl *D, const FullComment *FC, Location Loc,
RI->Template.emplace();
RI->Template->Specialization.emplace();
auto &Specialization = *RI->Template->Specialization;
+ auto *Mangler = ItaniumMangleContext::create(
+ D->getASTContext(), D->getASTContext().getDiagnostics());
+ std::string MangledName;
+ llvm::raw_string_ostream Stream(MangledName);
+ Mangler->mangleCXXVTT(dyn_cast<CXXRecordDecl>(D), Stream);
+ Specialization.MangledName.emplace(MangledName);
+ delete Mangler;
----------------
evelez7 wrote:
It'd be nice to keep this mangler somewhere so that it's not allocated/deleted constantly. If it was kept in the Clang-Doc Context, it'd have to be passed specifically to this emitInfo which would break the pattern we have.
https://github.com/llvm/llvm-project/pull/144617
More information about the cfe-commits
mailing list