[libcxx-commits] [PATCH] D124010: [llvm-cxxfilt] Unable to demangle a template argument which happens to be a null pointer
Owen Reynolds via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 27 10:17:59 PDT 2022
gbreynoo updated this revision to Diff 425555.
gbreynoo added a comment.
Updated with urnathan's suggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124010/new/
https://reviews.llvm.org/D124010
Files:
libcxxabi/src/demangle/ItaniumDemangle.h
libcxxabi/test/test_demangle.pass.cpp
llvm/include/llvm/Demangle/ItaniumDemangle.h
Index: llvm/include/llvm/Demangle/ItaniumDemangle.h
===================================================================
--- llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -4340,7 +4340,7 @@
return nullptr;
}
case 'D':
- if (consumeIf("DnE"))
+ if (consumeIf("Dn") && (consumeIf('0'), consumeIf('E')))
return make<NameType>("nullptr");
return nullptr;
case 'T':
Index: libcxxabi/test/test_demangle.pass.cpp
===================================================================
--- libcxxabi/test/test_demangle.pass.cpp
+++ libcxxabi/test/test_demangle.pass.cpp
@@ -644,6 +644,7 @@
{"_ZNSs4_Rep20_S_empty_rep_storageE", "std::string::_Rep::_S_empty_rep_storage"},
{"_ZZN23ImageLoaderMachOClassic26bindIndirectSymbolPointersERKN11ImageLoader11LinkContextEbbE13alreadyWarned", "ImageLoaderMachOClassic::bindIndirectSymbolPointers(ImageLoader::LinkContext const&, bool, bool)::alreadyWarned"},
{"_ZN12_GLOBAL__N_115emergency_mutexE", "(anonymous namespace)::emergency_mutex"},
+ {"_Z1fIDnLDn0EEvv", "void f<std::nullptr_t, nullptr>()"},
// clang
Index: libcxxabi/src/demangle/ItaniumDemangle.h
===================================================================
--- libcxxabi/src/demangle/ItaniumDemangle.h
+++ libcxxabi/src/demangle/ItaniumDemangle.h
@@ -4340,7 +4340,7 @@
return nullptr;
}
case 'D':
- if (consumeIf("DnE"))
+ if (consumeIf("Dn") && (consumeIf('0'), consumeIf('E')))
return make<NameType>("nullptr");
return nullptr;
case 'T':
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124010.425555.patch
Type: text/x-patch
Size: 1579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220427/54918d2e/attachment.bin>
More information about the libcxx-commits
mailing list