[PATCH] D118105: [Visualizers] Fix SmallVector visualizer. Use `value_type` instead of `$T1`.
Marek Kurdej via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 02:47:48 PST 2022
curdeius added a comment.
I hit this problem when working on clang-format.
In particular `AnnotatingParser` has `SmallVector<Context, 8> Contexts;` that did not work.
I'm using MSVC 2022 (14.31.31103, 17.1.0 preview 3.0, but that problem is there for a few weeks at least).
Using `$T1` I get:
F21839250: image.png <https://reviews.llvm.org/F21839250>
Using `value_type`, I get:
F21839261: image.png <https://reviews.llvm.org/F21839261>
and
F21839272: image.png <https://reviews.llvm.org/F21839272>
Maybe I should file a bug to MSVC?
BTW, the visualizer for `llvm::Optional` doesn't look good either.
It should be something like this:
<Type Name="llvm::Optional<*>">
<DisplayString Condition="!Storage.hasVal">None</DisplayString>
<DisplayString Condition="Storage.hasVal">{Storage.value}</DisplayString>
<Expand>
<Item Name="[underlying]" Condition="Storage.hasVal">Storage.value</Item>
</Expand>
</Type>
so use `Storage.value` instead of `*(($T1 *)(unsigned char *)Storage.storage.buffer)`.
It was changed back in February 2019 in commit https://github.com/llvm/llvm-project/commit/fb9730575086b3c2ba38a1aabf3106b01339888b.
Should I create a patch for Opional visualizer?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118105/new/
https://reviews.llvm.org/D118105
More information about the llvm-commits
mailing list