summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/data-formatter
AgeCommit message (Collapse)Author
2025-11-19[lldb][test] Correctly skip a test on a 32-bit target (#168631)Igor Kudrin
The test was added in #147252. On a 32-bit target, it fails with error: ``` File "...\TestDataFormatterLibcxxInvalidString.py", line 23, in test self.skip() ^^^^^^^^^ AttributeError: 'LibcxxInvalidStringDataFormatterTestCase' object has no attribute 'skip' ```
2025-11-13[lldb] Add libstdcpp initializer_list formatter (#167515)Ebuka Ezike
Make the existing libc++ formatter generic Add initializer_list summary provider. Add test for `libstdcpp`
2025-11-07[LLDB] Run MSVC STL string(-view) tests with PDB (#166833)nerix
PDB doesn't include the typedefs for types, so all types use their full name. For `std::string` and friends, this means they show up as `std::basic_string<char, std::char_traits<char>, std::allocator<char>>`. This PR updates the `std::{,w,u8,u16,u32}string(_view)` tests to account for this and runs them with PDB.
2025-11-06[LLDB] Run working STL data formatter tests with PDB (#166812)nerix
This enables testing with PDB for all tests that don't require any changes to pass. I ran the `lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic` tests locally and they passed.
2025-10-30[lldb][test] Fix libc++ API tests on older Clang versionsMichael Buch
Both of these fail on our Clang-19 macOS bots.
2025-10-13[LLDB] Check type before creating `std::atomic` synthetic children (#163176)nerix
From https://github.com/llvm/llvm-project/pull/163077#issuecomment-3396435083: Currently, `std::atomic<T>` will always use the MSVC STL synthetic children and summary. When inspecting types from other STLs, the output would not show any children. This PR adds a check that `std::atomic` contains `_Storage` to be classified as coming from MSVC's STL.
2025-10-02[lldb][test] Un-XFAIL TestDataFormatterStdUnorderedMap.py for older Clang ↵Michael Buch
versions Fixed in https://github.com/llvm/llvm-project/pull/156033
2025-09-16[LLDB] [Tests] Downgrade -Wincompatible-pointer-types to a warning in some ↵Sirraide
tests (#158756) These no longer compile because the warning now defaults to an error after #157364, so downgrade the error to a warning for now; I’m not familiar enough with either LLDB or MacOS to fix these warnings properly (assuming they’re unintended).
2025-09-15[lldb][test] Fix unordered-map test. (#158286)Ebuka Ezike
The build step is overidden so it uses `libstdc++` instead of `libc++` on linux
2025-09-05[lldb][DataFormatter] Allow std::string formatters to match against custom ↵Michael Buch
allocators (#156050) This came up in https://github.com/llvm/llvm-project/issues/155691. For `std::basic_string` our formatter matching logic required the allocator template parameter to be a `std::allocator`. There is no compelling reason (that I know of) why this would be required for us to apply the existing formatter to the string. We don't check the `allocator` parameter for other STL containers either. This meant that `std::string` that used custom allocators wouldn't be formatted. This patch relaxes the regex for `basic_string`.
2025-09-04[lldb] Correct style of error messages (#156774)Jonas Devlieghere
The LLVM Style Guide says the following about error and warning messages [1]: > [T]o match error message styles commonly produced by other tools, > start the first sentence with a lowercase letter, and finish the last > sentence without a period, if it would end in one otherwise. I often provide this feedback during code review, but we still have a bunch of places where we have inconsistent error message, which bothers me as a user. This PR identifies a handful of those places and updates the messages to be consistent. [1] https://llvm.org/docs/CodingStandards.html#error-and-warning-messages
2025-08-28[lldb][test] Run ranges::ref_vew test only for libc++ (#155813)Ebuka Ezike
Remove redundant build step in std::ranges::ref_view test, this causes it use `libstdc++` on linux instead of `libc++` .
2025-08-25[lldb][DataFormatters] Support newer _LIBCPP_COMPRESSED_PAIR layout (#155153)Michael Buch
Starting with https://github.com/llvm/llvm-project/pull/154686 the compressed_pair children are now wrapped in an anonymous structure. This patch adjusts the LLDB data-formatters to support that. Outstanding questions: 1. Should GetChildMemberWithName look through anonymous structures? That will break users most likely. But maybe introducing a new API is worth it? Then we wouldnt have to do this awkward passing around of `anon_struct_index` 2. Do we support the layout without the anonymous structure? It's not too much added complexity. And we did release that version of libc++, so there is code out there compiled against it. But there is no great way of testing it (some of our macOS matrix bots do test it i suppose, but not in a targeted way). We have the layout "simulator" tests for some of the STL types which I will adjust.
2025-08-09[clang] Improve nested name specifier AST representation (#147835)Matheus Izvekov
This is a major change on how we represent nested name qualifications in the AST. * The nested name specifier itself and how it's stored is changed. The prefixes for types are handled within the type hierarchy, which makes canonicalization for them super cheap, no memory allocation required. Also translating a type into nested name specifier form becomes a no-op. An identifier is stored as a DependentNameType. The nested name specifier gains a lightweight handle class, to be used instead of passing around pointers, which is similar to what is implemented for TemplateName. There is still one free bit available, and this handle can be used within a PointerUnion and PointerIntPair, which should keep bit-packing aficionados happy. * The ElaboratedType node is removed, all type nodes in which it could previously apply to can now store the elaborated keyword and name qualifier, tail allocating when present. * TagTypes can now point to the exact declaration found when producing these, as opposed to the previous situation of there only existing one TagType per entity. This increases the amount of type sugar retained, and can have several applications, for example in tracking module ownership, and other tools which care about source file origins, such as IWYU. These TagTypes are lazily allocated, in order to limit the increase in AST size. This patch offers a great performance benefit. It greatly improves compilation time for [stdexec](https://github.com/NVIDIA/stdexec). For one datapoint, for `test_on2.cpp` in that project, which is the slowest compiling test, this patch improves `-c` compilation time by about 7.2%, with the `-fsyntax-only` improvement being at ~12%. This has great results on compile-time-tracker as well: ![image](https://github.com/user-attachments/assets/700dce98-2cab-4aa8-97d1-b038c0bee831) This patch also further enables other optimziations in the future, and will reduce the performance impact of template specialization resugaring when that lands. It has some other miscelaneous drive-by fixes. About the review: Yes the patch is huge, sorry about that. Part of the reason is that I started by the nested name specifier part, before the ElaboratedType part, but that had a huge performance downside, as ElaboratedType is a big performance hog. I didn't have the steam to go back and change the patch after the fact. There is also a lot of internal API changes, and it made sense to remove ElaboratedType in one go, versus removing it from one type at a time, as that would present much more churn to the users. Also, the nested name specifier having a different API avoids missing changes related to how prefixes work now, which could make existing code compile but not work. How to review: The important changes are all in `clang/include/clang/AST` and `clang/lib/AST`, with also important changes in `clang/lib/Sema/TreeTransform.h`. The rest and bulk of the changes are mostly consequences of the changes in API. PS: TagType::getDecl is renamed to `getOriginalDecl` in this patch, just for easier to rebasing. I plan to rename it back after this lands. Fixes #136624 Fixes https://github.com/llvm/llvm-project/issues/43179 Fixes https://github.com/llvm/llvm-project/issues/68670 Fixes https://github.com/llvm/llvm-project/issues/92757
2025-07-25[LLDB] Add formatters for MSVC STL std::string_view and friends (#150318)nerix
Adds summaries for `std::{,w,u8,u16,u32}string_view`s from MSVC's STL. A few functions from the string formatting can be reused. Towards #24834.
2025-07-23[LLDB] Add formatters for MSVC STL std::deque (#150097)nerix
This PR adds synthetic children for std::deque from MSVC's STL. Similar to libstdc++ and libc++, the elements are in a `T**`, so we need to "subscript" twice. The [NatVis for deque](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L1103-L1112) uses `_EEN_DS` which contains the block size. We can't access this, but we can access the [constexpr `_Block_size`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/inc/deque#L641). Towards #24834.
2025-07-23[LLDB] Add formatters for MSVC STL map-like types (#148385)nerix
This PR adds formatters for `std::map`, `std::set`, `std::multimap`, `std::multiset` as well as their iterators. It's done in one PR because the types are essentially the same (a tree) except for their value type. The iterators are required because of the tests. `MsvcStlTreeIterSyntheticFrontEnd` is based on the libc++ equivalent. As opposed to `std::list`, there aren't that many duplicates, so I didn't create a generic type. For reference, the tree is implemented in https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/inc/xtree. Towards #24834.
2025-07-22[LLDB] Add formatters for MSVC STL unordered containers (#149519)nerix
Adds formatters for MSVC STL's unordered containers. This one is relatively simple, because it can reuse the `std::list` synthetic children. The unordered containers (aka [`_Hash`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/inc/xhash#L327)) contain a [`_List`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/inc/xhash#L2012) which contains all elements (and is used for iterating through the container). Towards https://github.com/llvm/llvm-project/issues/24834.
2025-07-22[LLDB] Add formatters for MSVC STL std::atomic (#149801)nerix
Adds synthetic children and a summary provider for `std::atomic` on MSVC's STL. This currently only supports DWARF because it relies on the template argument. Once there are PDB tests, this will probably use the return type of some method like `value()` because template types aren't available there. Towards #24834.
2025-07-21[LLDB] Add formatters for MSVC STL std::variant (#148554)nerix
Adds a summary and synthetic children for MSVC STL's `std::variant`. This one is a bit complicated because of DWARF vs PDB differences. I put the representations in comments. Being able to `GetChildMemberWithName` a member in an anonymous union would make this a lot simpler (`std::optional` will have something similar iirc). Towards #24834.
2025-07-21[LLDB] Add formatters for MSVC STL std::optional (#149545)nerix
Adds synthetic children for `std::optional` from MSVC's STL. Most of the machinery for `std::optional` is already there. Towards #24834.
2025-07-18[lldb][test] TestNSDictionarySynthetic.py: adjust ptr depth in testMichael Buch
Fixes failure after we introduced a default limit in https://github.com/llvm/llvm-project/pull/149282 We already did this test change on the Apple fork.
2025-07-17[lldb][test] Remove XFAIL from some Windows testsDavid Spickett
These are now passing on Windows x86_64 and Arm64.
2025-07-16[LLDB] Add formatters for MSVC STL std::(forward_)list (#148285)nerix
Adds synthetic providers for MSVC's `std::forward_list` and `std::list`. It refactors `LibCxxList` to be generic over the STL type (currently libc++ or MSVC STL). The libstdc++ synthetic providers use something similar in Python [here](https://github.com/llvm/llvm-project/blob/3092b765ba0b2d20bd716944dda86ea8e4ad12e3/lldb/examples/synthetic/gnu_libstdcpp.py#L134). Eventually, this could be ported to C++ as well. Towards #24834.
2025-07-16[LLDB] Add formatters for MSVC STL std::vector (#147538)nerix
This adds synthetic child providers for `std::vector<T>` and `std::vector<bool>` for MSVC's STL. The structure of a `std::vector<T>` is relatively similar to libc++'s implementation that uses `__begin` and `__end`. `std::vector<bool>` is different. It's a `std::vector<unsigned int>` wrapper instead of `std::vector<uint8_t>`. This makes the calculation slightly less simple. I put a comment in the `GetChildAtIndex` to make this clear. - [NatVis for `std::vector<T>`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L1193-L1205) - [NatVis for `std::vector<bool>`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L1167-L1179) Towards #24834.
2025-07-15[LLDB] Compile API tests with exceptions enabled on Windows (#148691)nerix
From #148554 - compile tests with exceptions on Windows (`-fno-exceptions` was added 11 years ago in c7826524acda6a9c8816261d5c48b94dc92935ed). The variant test uses `try {} catch {}` to create variants that are valueless by exception. On other platforms, exceptions are enabled as well. I have no clue why compiling with exceptions will optimize out `a_long_guy` in the changed test (even with `-O0`). Taking the address of that value will ensure it's kept.
2025-07-15[LLDB] Add formatters for MSVC STL std::tuple (#148548)nerix
Adds synthetic children for MSVC STL's [`std::tuple`](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/inc/tuple). A `tuple` is a chain of base classes: ```cpp template <> class tuple<> {}; template <class _This, class... _Rest> class tuple<_This, _Rest...> : private tuple<_Rest...> { _Tuple_val<_This> _Myfirst; }; ``` So the provider walks the base classes to the desired one. The implementation makes it hard to detect if the empty tuple is from this STL. Fortunately, libstdc++'s synthetic children provider works for empty MSVC STL tuples as well. Towards #24834.
2025-07-14[LLDB] Add formatters for MSVC STL std::unique_ptr (#148248)nerix
This PR adds a summary and synthetic children for `std::unique_ptr` from MSVC's STL ([NatVis](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L285-L303)). As with libc++, the deleter is only shown if it's non-empty. Tested both the shared_ptr and unique_ptr tests on Windows. Towards #24834.
2025-07-11[LLDB] Add formatters for MSVC STL std::shared_ptr (#147575)nerix
This PR adds formatters for `std::shared_ptr` and `std::weak_ptr`. They are similar to the ones from libc++ and libstdc++. [Section from MSVC STL NatVis](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L512-L578). To support debugging with PDB debug info, I had to add an early exit in `GetDesugaredSmartPointerValue`, because with PDB, LLDB doesn't know about template types. This isn't an issue here, since the typedef type is already resolved there, so no casting is needed. The tests don't check for PDB - maybe this should be changed? I don't know a good way to do this. PDB has the downside that it resolves typedefs. Here in particular, the test for `element_type` would need to be replaced with `User` and `std::string` with `std::basic_string<char,std::char_traits<char>,std::allocator<char> >`. Towards #24834.
2025-07-11[lldb][test] Combine libstdc++ and libc++ iterator tests into generic test ↵Michael Buch
(#147175) This combines the libc++ and libstdc++ test cases. The libstdcpp tests were a subset of the libc++ test, so this patch moves the libcxx test into generic and removes the libstdcpp test entirely. There are currently no formatters for libstdcpp std::unorderd_map::iterator. So I removed those test-cases. We already test them for libc++ in `libcxx/unordered_map-iterator`. And we test `std::unordered_map` in `generic/unorderd`. So these test-cases would be redundant. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Move std::function from libcxx to generic directory (#147701)Michael Buch
This just moves the test from `libcxx` to `generic`. There are currently no `std::function` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Move std::initializer_list from libcxx to generic directory ↵Michael Buch
(#147702) This just moves the test from `libcxx` to `generic`. There are currently no `std::initializer_list` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Fix MSVC std::string formatter testsMichael Buch
These were mistakenly changed during https://github.com/llvm/llvm-project/pull/147525
2025-07-09[lldb][test] Move std::ranges::ref_view from libcxx to generic directory ↵Michael Buch
(#147705) This just moves the test from `libcxx` to `generic`. There are currently no `std::ranges::ref_view` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Merge MSVC STL std::(u8)string tests into generic directory ↵Michael Buch
(#147525) Now that most STL formatter tests have been moved to `generic`. Do the same for the MSVC tests (which are currently just for `std::string`). The `std::string` test was mostly the same (MSVC just had 1 additional check, which I moved over). We also only tested `u8string` with MSVC. So i moved those into `generic` as-is. I kept it separate from the existing std::string tests since it requires c++20. The tests are currently failing for libc++ and libstdc++ because MSVC had a test case which checked that: ``` std::string overwritten_zero("abc"); const_cast<char *>(overwritten_zero.data())[3] = 'd'; ``` prints as `"abc"`. But libc++ and libstdc++ print it as `"abcd"` (which seems like the more correct thing to do?)
2025-07-09[lldb][test] Move std::valarray from libcxx to generic directory (#147704)Michael Buch
This just moves the test from `libcxx` to `generic`. There are currently no `std::valarray` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Move std::unordered_map::iterator from libcxx to generic… ↵Michael Buch
(#147703) … directory This just moves the test from `libcxx` to `generic`. There are currently no `std::unordered_map::iterator` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Move std::span from libcxx to generic directory (#147680)Michael Buch
This just moves the test from `libcxx` to `generic`. There are currently no `std::span` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-09[lldb][test] Move std::string_view from libcxx to generic directory (#147563)Michael Buch
This just moves the test from `libcxx` to `generic`. There are currently no `std::string_view` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-08[lldb][test] Move std::queue from libcxx to generic directory (#147529)Michael Buch
This just moves the test from `libcxx` to `generic`. There are currently no `std::queue` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-08[lldb][Formatters] Consistently unwrap pointer element_type in ↵Michael Buch
std::shared_ptr formatters (#147340) Follow-up to https://github.com/llvm/llvm-project/pull/147165#pullrequestreview-2992585513 Currently when we explicitly dereference a std::shared_ptr, both the libstdc++ and libc++ formatters will cast the type of the synthetic pointer child to whatever the `std::shared_ptr::element_type` is aliased to. E.g., ``` (lldb) v p (std::shared_ptr<int>) p = 10 strong=1 weak=0 { pointer = 0x000000010016c6a0 } (lldb) v *p (int) *p = 10 ``` However, when we print (or dereference) `p.pointer`, the type devolves to something less user-friendly: ``` (lldb) v p.pointer (std::shared_ptr<int>::element_type *) p.pointer = 0x000000010016c6a0 (lldb) v *p.pointer (std::shared_ptr<int>::element_type) *p.pointer = 10 ``` This patch changes both formatters to store the casted type. Then `GetChildAtIndex` will consistently use the unwrapped type.
2025-07-08[lldb][test] Combine libstdc++ and libc++ std::string tests into generic ↵Michael Buch
test (#147355) This combines the libc++ and libstdc++ test cases. The main difference was that the libstdcpp tests had additional tests for references/pointers to std::string. I moved those over. The libstdc++ formatters don't support `std::u16string`/`std::u32string` yet, so I extracted those into XFAILed test cases. There were also two test assertions that failed for libstdc++: 1. libstdc++ doesn't obey the capped/uncapped summary options 2. When a summary isn't available for a std::string, libc++ would print "Summary Unavailable", whereas libstdc++ just prints "((null))". This may be better suited for the STL-specific subdirectories, but left it here for now. I put those in separate XFAILed test-cases. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-08[lldb][test] Combine libstdc++ and libc++ std::variant tests into generic ↵Michael Buch
test (#147253) This combines the libc++ and libstdc++ test cases. The libstdc++ test had an additional test-case for "reference to typedef". So I added those to the generic test. The rest of the tests was the same as libc++. I also moved the test-case for checking invalid variant indexes into a separate libstdcpp test because it relied on the layout of the libstdc++ type. We should probably rewrite it in the "simulator" style. But for now I just moved it. This also removes some redundant checks for libc++ versions and existence of the `variant` header, which at this point should be available anywhere these tests are run. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-08[LLDB] Add type summaries for MSVC STL strings (#143177)nerix
This PR adds type summaries for `std::{string,wstring,u8string,u16string,u32string}` from the MSVC STL. See https://github.com/llvm/llvm-project/issues/24834 for the MSVC STL issue. The following changes were made: - `dotest.py` now detects if the MSVC STL is available. It does so by looking at the target triple, which is an additional argument passed from Lit. It specifically checks for `windows-msvc` to not match on `windows-gnu` (i.e. MinGW/Cygwin). - (The main part): Added support for summarizing `std::(w)string` from MSVC's STL. Because the type names from the libstdc++ (pre C++ 11) string types are the same as on MSVC's STL, `CXXCompositeSummaryFormat` is used with two entries, one for MSVC's STL and one for libstdc++. With MSVC's STL, `std::u{8,16,32}string` is also handled. These aren't handled for libstdc++, so I put them in `LoadMsvcStlFormatters`.
2025-07-08[lldb][test] Combine libstdc++ and libc++ tuple tests into generic test ↵Michael Buch
(#147139) This combines the libc++ and libstdc++ test cases. The main difference was that the libstdcpp tests had some tuple indexing tests that libc++ didn't have. The libstdc++ formatter didn't support size summaries for std::tuple. So I added a `ContainerSizeSummaryProvider` for it (like we do for libc++). Additionally, the synthetic frontend would only apply to non-empty tuples, so I adjusted the regex to match empty ones too. We do this for libc++ already. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-07[lldb][test] Fix libstdc++ std::variant formatter tests for valueless ↵Michael Buch
variants (#147283) A default-constructed variant has a valid index (being the first element of the variant). The only case where the index is variant_npos is when the variant is "valueless", which [according to cppreference](https://en.cppreference.com/w/cpp/utility/variant/valueless_by_exception.html) only happens when an exception is thrown during assignment to the variant. I adjusted the test to test that scenario, and the formatter seems to work. Unblocks https://github.com/llvm/llvm-project/pull/147253
2025-07-07[lldb][test] Combine libstdc++ and libc++ std::shared_ptr tests into generic ↵Michael Buch
test (#147141) This combines the libc++ and libstdc++ test cases. The libstdcpp tests were a subset of the libc++ test, so this patch moves the libcxx test into `generic` and removes the libstdcpp test entirely. Split out from https://github.com/llvm/llvm-project/pull/146740
2025-07-07[lldb][Formatters] Add shared/weak count to libstdc++ std::shared_ptr ↵Michael Buch
summary (#147166) Depends on https://github.com/llvm/llvm-project/pull/147165 This adds weak/strong counts to the std::shared_ptr summary of the libstdcxx formatters. We already do this for libcxx. This will make it easier to consolidate the tests into a generic one (see https://github.com/llvm/llvm-project/pull/147141).
2025-07-07[lldb][test] Split out libc++ std::string tests that check corrupted strings ↵Michael Buch
(#147252) As a pre-requisite to combine the libcxx and libstdcxx string formatter tests (see https://github.com/llvm/llvm-project/pull/146740) this patch splits out the libcxx specific parts into a separate test. These are probably best tested with the libcxx-simulator tests. But for now I just moved them.
2025-07-07[lldb][Formatter] Consolidate libstdc++ and libc++ unique_ptr formatter ↵Michael Buch
tests into generic test (#147031) The libc++ test was a subset of the tests in libstdc++. This test moves the libc++ test into `generic` and somne additional test-cases from `libstdc++` (specifically the recursive unique_ptr case). It turns out the libstdc++ formatter supports dereferencing using the "object" or "obj" names. We could either drop those from the tests or support the same for libc++. I took the latter approach but don't have strong opinions on this. Split out from https://github.com/llvm/llvm-project/pull/146740