[clang-tools-extra] [clang-doc] mangle template specialization file names (PR #144617)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 20 10:59:14 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;
----------------
ilovepi wrote:

Can it just be static to the function?

https://github.com/llvm/llvm-project/pull/144617


More information about the cfe-commits mailing list