summaryrefslogtreecommitdiffstats
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
commit334aa07915cf1f70f3389a4c4801f77a746b0a93 (patch)
tree89eccc95581fe29f91a5d0b01faed7a36c1ca59d
parent5d321e63c02c0399739d4f48695086b7dc2306db (diff)
downloadbcm5719-llvm-334aa07915cf1f70f3389a4c4801f77a746b0a93.tar.gz
bcm5719-llvm-334aa07915cf1f70f3389a4c4801f77a746b0a93.zip
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} llvm-svn: 272448
-rw-r--r--clang/utils/ClangVisualizers/clang.natvis18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/utils/ClangVisualizers/clang.natvis b/clang/utils/ClangVisualizers/clang.natvis
index 72ecc6a4b23..62cea41950a 100644
--- a/clang/utils/ClangVisualizers/clang.natvis
+++ b/clang/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>
OpenPOWER on IntegriCloud