Skip to content

Commit

Permalink
Add a Clang NATVIS visualizer for StringLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronBallman committed Nov 12, 2023
1 parent ca10e3b commit 8569465
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clang/utils/ClangVisualizers/clang.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,15 @@ For later versions of Visual Studio, no setup is required-->
</Expand>
</Type>
<Type Name="clang::Expr">
<DisplayString Condition="StmtBits.sClass==clang::Stmt::StmtClass::StringLiteralClass" IncludeView="poly">{*(clang::StringLiteral *)this}</DisplayString>
<DisplayString>Expression of class {(clang::Stmt::StmtClass)StmtBits.sClass,en} and type {TR,view(cpp)}</DisplayString>
</Type>
<Type Name="clang::StringLiteral">
<Expand>
<Item Name="Length">*(unsigned *)(((clang::StringLiteral *)this)+1)</Item>
<Item Name="Data" Condition="StringLiteralBits.NumConcatenated==1">(const char *)(((clang::StringLiteral *)this)+1)+4+4,[*(unsigned *)(((clang::StringLiteral *)this)+1)]s8</Item>
</Expand>
</Type>
<Type Name="clang::DeclAccessPair">
<DisplayString IncludeView="access" Condition="(Ptr&amp;Mask) == clang::AS_public">public</DisplayString>
<DisplayString IncludeView="access" Condition="(Ptr&amp;Mask) == clang::AS_protected">protected</DisplayString>
Expand Down

0 comments on commit 8569465

Please sign in to comment.