r211788 - Add a Visualizer for VarDecl.
Zachary Turner
zturner at google.com
Thu Jun 26 09:26:43 PDT 2014
Author: zturner
Date: Thu Jun 26 11:26:42 2014
New Revision: 211788
URL: http://llvm.org/viewvc/llvm-project?rev=211788&view=rev
Log:
Add a Visualizer for VarDecl.
Reviewed by: Aaron Ballman
Differential Revision: http://reviews.llvm.org/D4303
Modified:
cfe/trunk/utils/clang.natvis
Modified: cfe/trunk/utils/clang.natvis
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=211788&r1=211787&r2=211788&view=diff
==============================================================================
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Thu Jun 26 11:26:42 2014
@@ -15,14 +15,14 @@ or create a symbolic link so it updates
</Type>
<Type Name="clang::DeclarationName">
<DisplayString Condition="Ptr == 0">Empty</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
<DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">{{Extra ({(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs})}}</DisplayString>
<Expand>
- <Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
- <Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
- <Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
<Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs</Item>
</Expand>
</Type>
@@ -41,4 +41,19 @@ or create a symbolic link so it updates
<Type Name="clang::DirectoryEntry">
<DisplayString>{Name,s}</DisplayString>
</Type>
+ <Type Name="clang::VarDecl::VarDeclBitfields">
+ <Expand>
+ <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
+ <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
+ <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::VarDecl">
+ <DisplayString>{Name}</DisplayString>
+ <Expand>
+ <ExpandedItem>*(DeclaratorDecl*)this,nd</ExpandedItem>
+ <Item Name="VarDeclBits">VarDeclBits</Item>
+ <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
+ </Expand>
+ </Type>
</AutoVisualizer>
More information about the cfe-commits
mailing list