summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMike Spertus <mike@spertus.com>2016-06-11 03:02:33 +0000
committerMike Spertus <mike@spertus.com>2016-06-11 03:02:33 +0000
commit752bad647c76f0867edee2631f8eb8cc5334494f (patch)
tree1638a5c2e070b00d78be12cdd07bf6cebc2d9d3f /utils
parent3749d0e30f157b047746f55a85407c26340cf841 (diff)
Visual Studio visualizers associated with LookupResults
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} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/ClangVisualizers/clang.natvis18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/ClangVisualizers/clang.natvis b/utils/ClangVisualizers/clang.natvis
index 72ecc6a4b2..62cea41950 100644
--- a/utils/ClangVisualizers/clang.natvis
+++ b/utils/ClangVisualizers/clang.natvis
@@ -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>