[Lldb-commits] [PATCH] D90318: Return actual type from SBType::GetArrayElementType
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 28 10:57:30 PDT 2020
jingham added a comment.
This was done on purpose, in commit 902974277d507a149e33487d32e4ba58c41451b6 <https://reviews.llvm.org/rG902974277d507a149e33487d32e4ba58c41451b6>. The comment there is:
Data formatters: Look through array element typedefs
Summary:
Motivation: When formatting an array of typedefed chars, we would like to display the array as a string.
The string formatter currently does not trigger because the formatter lookup does not resolve typedefs for array elements (this behavior is inconsistent with pointers, for those we do look through pointee typedefs). This patch tries to make the array formatter lookup somewhat consistent with the pointer formatter lookup.
So far as I can tell from the discussion in that review, it removed some lower level code that was resolving the typedef too early, then added it at the SB layer to preserve previous behavior, even though that behavior was acknowledged to be not great. There was some promise to come back and fix the SB layer which it doesn't seem like it even happened.
So this patch seems in line with the intent of the previous revision, but Raphael and Greg were the ones active in the review of that older patch, maybe they remember more about this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90318/new/
https://reviews.llvm.org/D90318
More information about the lldb-commits
mailing list