[libcxx-commits] [PATCH] D83732: Desugar class type for iterator lookup.
Sterling Augustine via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 13 17:21:38 PDT 2020
saugustine created this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Without this, printing sets and maps hidden behind
using declarations fail.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83732
Files:
libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
libcxx/utils/gdb/libcxx/printers.py
Index: libcxx/utils/gdb/libcxx/printers.py
===================================================================
--- libcxx/utils/gdb/libcxx/printers.py
+++ libcxx/utils/gdb/libcxx/printers.py
@@ -698,7 +698,7 @@
def _init_cast_type(self, val_type):
map_it_type = gdb.lookup_type(
- str(val_type) + "::iterator").strip_typedefs()
+ str(val_type.strip_typedefs()) + "::iterator").strip_typedefs()
tree_it_type = map_it_type.template_argument(0)
node_ptr_type = tree_it_type.template_argument(1)
return node_ptr_type
@@ -717,7 +717,7 @@
def _init_cast_type(self, val_type):
set_it_type = gdb.lookup_type(
- str(val_type) + "::iterator").strip_typedefs()
+ str(val_type.strip_typedefs()) + "::iterator").strip_typedefs()
node_ptr_type = set_it_type.template_argument(1)
return node_ptr_type
Index: libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
===================================================================
--- libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
+++ libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
@@ -383,6 +383,10 @@
ComparePrettyPrintToChars(prime_pairs,
"std::set with 2 elements = {"
"{first = 3, second = 5}, {first = 5, second = 7}}");
+
+ using using_set = std::set<int>;
+ using_set other{1, 2, 3};
+ ComparePrettyPrintToChars(other, "std::set with 3 elements = {1, 2, 3}");
}
void stack_test() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83732.277623.patch
Type: text/x-patch
Size: 1501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200714/cc574108/attachment.bin>
More information about the libcxx-commits
mailing list