Skip to content

Commit 56bd1fe

Browse files
authored
STL.natvis: Simplify visualization for string_view (#5176)
1 parent d4b57c7 commit 56bd1fe

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

stl/debugger/STL.natvis

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,8 +1112,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11121112
<Type Name="std::basic_string_view&lt;*,*&gt;">
11131113
<Intrinsic Name="size" Expression="_Mysize" />
11141114
<Intrinsic Name="data" Expression="_Mydata" />
1115-
<DisplayString>{_Mydata,[_Mysize]}</DisplayString>
1116-
<StringView>_Mydata,[_Mysize]</StringView>
1115+
<DisplayString>{_Mydata,[_Mysize]na}</DisplayString>
1116+
<StringView>_Mydata,[_Mysize]na</StringView>
11171117
<Expand>
11181118
<Item Name="[size]" ExcludeView="simple">size()</Item>
11191119
<ArrayItems>
@@ -1125,19 +1125,20 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11251125

11261126
<!-- This is for _ITERATOR_DEBUG_LEVEL == 0 and must have lower priority. -->
11271127
<Type Name="std::_String_view_iterator&lt;*&gt;" Priority="MediumLow">
1128-
<SmartPointer Usage="Indexable">_Myptr</SmartPointer>
1128+
<SmartPointer Usage="Indexable">_Myptr,na</SmartPointer>
11291129
<Expand>
11301130
<Item Name="[ptr]">_Myptr</Item>
11311131
</Expand>
11321132
</Type>
11331133

11341134
<!-- This is for _ITERATOR_DEBUG_LEVEL != 0 and must have higher priority. -->
11351135
<Type Name="std::_String_view_iterator&lt;*&gt;" Priority="Medium">
1136-
<SmartPointer Usage="Indexable">_Mydata + _Myoff</SmartPointer>
1136+
<DisplayString>{_Mydata + _Myoff,[_Mysize - _Myoff]na}</DisplayString>
1137+
<StringView>_Mydata + _Myoff,[_Mysize - _Myoff]na</StringView>
11371138
<Expand>
11381139
<Item Name="[ptr]">_Mydata + _Myoff</Item>
11391140
<Item Name="[offset]">_Myoff</Item>
1140-
<Item Name="[string_view]">_Mydata,[_Mysize]</Item>
1141+
<Item Name="[string_view]">_Mydata,[_Mysize]na</Item>
11411142
</Expand>
11421143
</Type>
11431144

0 commit comments

Comments
 (0)