add support for demangling c++ type names (libstdc++)#578
Conversation
|
@leftibot review this PR and take into consideration the impact it might have across supported platforms |
PR Review: Demangling C++ Type NamesSummaryThis PR adds Cross-Platform Concerns1. MSVC — no behavioral change, but a missed opportunity MSVC's 2. MinGW — MinGW-w64 with libstdc++ does ship 3. Emscripten Emscripten provides Code Quality Issues4. The function is marked 5. Return type inconsistency
6. Memory management is correct but fragile The std::unique_ptr<char, decltype(&std::free)> demangled(
abi::__cxa_demangle(m_bare_type_info->name(), nullptr, nullptr, &status),
&std::free);
if (demangled) {
return std::string(demangled.get());
}7. This is evaluated at compile time in both locations, which is fine, but if someone were to conditionally define Behavioral Impact8. The change at RecommendationThis PR needs the following before merging:
Without at least items 1 and 2, I would not merge this — the |
Changes proposed in this pull request