[Lldb-commits] [lldb] [lldb][Formatters] Do not recursively dereference pointer type when creating formatter candicates list. (PR #124048)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 23 10:30:49 PST 2025
ZequanWu wrote:
> How does this patch fit with the:
>
> ```
> -p ( --skip-pointers )
> Don't use this format for pointers-to-type objects.
>
> -r ( --skip-references )
> Don't use this format for references-to-type objects.
> ```
>
> settings in `type <formatter> add`? It seems like we let the formatters control whether they should also apply to pointers and references to those types. Shouldn't that be what controls whether formatters also apply to pointers?
>
> And if a formatter says it can handle pointers, it's up to the formatter to do that right.
This has no impact for reference. For pointers, if `-p` is set in `type <formatter> add`, the new formatter will apply only the type T and this patch has no impact for that. This patch changes the behaviour when `-p` is not set. Currently, lldb apply the new formatter to `T`, `T*`, `T**` and so on if `-p` is not set. This change let lldb only apply the formatter to `T` and `T*`.
https://github.com/llvm/llvm-project/pull/124048
More information about the lldb-commits
mailing list