Skip to content

Commit

Permalink
Visual Studio visualizers associated with LookupResults
Browse files Browse the repository at this point in the history
Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example,
when combined with LLVM diff D21256 (currently in review), a Lookup set will
show much more naturally in the Locals window something like

  Found: {public typename ...Ts}

llvm-svn: 272448
  • Loading branch information
mspertus committed Jun 11, 2016
1 parent 5d321e6 commit 334aa07
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions clang/utils/ClangVisualizers/clang.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,22 @@ For later versions of Visual Studio, no setup is required-->
<Type Name="clang::Expr">
<DisplayString>Expression of class {(clang::Stmt::StmtClass)StmtBits.sClass,en} and type {TR,view(cpp)}</DisplayString>
</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>
<DisplayString IncludeView="access" Condition="(Ptr&amp;Mask) == clang::AS_private">private</DisplayString>
<DisplayString IncludeView="access" Condition="(Ptr&amp;Mask) == clang::AS_none">b</DisplayString>
<DisplayString IncludeView="decl">{*(clang::NamedDecl *)(Ptr&amp;~Mask)}</DisplayString>
<DisplayString>{*this,view(access)} {*this,view(decl)}</DisplayString>
</Type>
<Type Name="clang::UnresolvedSet&lt;*&gt;">
<DisplayString>{Decls}</DisplayString>
<Expand>
<ExpandedItem>Decls</ExpandedItem>
</Expand>
</Type>
<Type Name="clang::LookupResult">
<DisplayString Condition="ResultKind == clang::LookupResult::Ambiguous">{Ambiguity,en}: {Decls}</DisplayString>
<DisplayString>{ResultKind,en}: {Decls}</DisplayString>
</Type>
</AutoVisualizer>

0 comments on commit 334aa07

Please sign in to comment.