blob: 63f7f7634b1592f5544b08f929acc314617bdbee [file] [log] [blame]
Aaron Ballman83f197b2014-01-24 19:46:45 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--
Mike Spertus288daa52016-03-08 16:14:23 +00003Visual Studio Native Debugging Visualizers for LLVM
Aaron Ballman83f197b2014-01-24 19:46:45 +00004
Mike Spertus288daa52016-03-08 16:14:23 +00005Put this file into "%USERPROFILE%\Documents\Visual Studio 20xx\Visualizers"
Aaron Ballman83f197b2014-01-24 19:46:45 +00006or create a symbolic link so it updates automatically.
7-->
8<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
Mike Spertus01b14bf2016-03-16 14:27:50 +00009
Aaron Ballman9d214542015-09-29 17:32:36 +000010 <Type Name="clang::Type">
Mike Spertus01b14bf2016-03-16 14:27:50 +000011 <!-- To visualize clang::Types, we need to look at TypeBits.TC to determine the actual
12 type subclass and manually dispatch accordingly (Visual Studio can't identify the real type
13 because clang::Type has no virtual members hence no RTTI).
14
15 Views:
16 "cmn": Visualization that is common to all clang::Type subclasses
17 "poly": Visualization that is specific to the actual clang::Type subclass. The subtype-specific
18 <DisplayString> is typically as C++-like as possible (like in dump()) with <Expand>
19 containing all the gory details.
20 "cpp": Only occasionally used when we need to distinguish between an ordinary view and a C++-like view.
21 -->
22 <DisplayString IncludeView="cmn">{(clang::Type::TypeClass)TypeBits.TC, en}Type</DisplayString>
23 <!-- Dispatch to visualizers for the actual Type subclass -->
24 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin" IncludeView="poly">{*(clang::BuiltinType *)this}</DisplayString>
25 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
26 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference" IncludeView="poly">{*(clang::LValueReferenceType *)this}</DisplayString>
27 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference" IncludeView="poly">{*(clang::RValueReferenceType *)this}</DisplayString>
28 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
29 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>
30 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm" IncludeView="poly">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>
31 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000032 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{*(clang::FunctionProtoType *)this}</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +000033 <DisplayString IncludeView="cpp">{*this,view(poly)}</DisplayString>
34 <DisplayString IncludeView="poly">{*this,view(cmn)}"</DisplayString> <!-- Not yet implemented Type subclass -->
35 <DisplayString>{*this,view(cmn)} {{{*this,view(poly)}}}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +000036 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +000037 <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>
38 <Item Name="Flags" IncludeView="cmn">TypeBits</Item>
39 <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>
40 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>
41 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>
42 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>
43 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>
44 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>
45 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>
46 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>
47 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000048 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +000049 </Expand>
50 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +000051 <Type Name="clang::PointerType">
52 <DisplayString>{PointeeType, view(poly)} *</DisplayString>
53 <Expand>
54 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
55 <Item Name="PointeeType">PointeeType</Item>
56 </Expand>
57 </Type>
58 <!-- We visualize all inner types for clang reference types. So a rvalue reference to an lvalue reference
59 to an int would visual as int &amp; &amp;&amp; This is a little different than GetPointeeType(),
60 but more clearly displays the data structure and seems natural -->
61 <Type Name="clang::LValueReferenceType">
62 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;</DisplayString>
63 <Expand>
64 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
65 <Item Name="PointeeType">PointeeType</Item>
66 </Expand>
67 </Type>
68 <Type Name="clang::RValueReferenceType">
69 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;&amp;</DisplayString>
70 <Expand>
71 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
72 <Item Name="PointeeType">PointeeType</Item>
73 </Expand>
74 </Type>
75 <Type Name="clang::AttributedType">
76 <DisplayString>{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>
77 </Type>
Mike Spertusa814d3d2016-03-18 16:38:34 +000078
79 <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
80 <Type Name="clang::DeclContext">
81 <DisplayString>{(clang::Decl::Kind)DeclKind,en}Decl</DisplayString>
82 <Expand>
83 <Item Name="DeclKind">(clang::Decl::Kind)DeclKind,en</Item>
84 <LinkedListItems>
85 <HeadPointer>FirstDecl</HeadPointer>
86 <NextPointer>(clang::Decl *)(NextInContextAndBits.Value &amp; ~3)</NextPointer>
87 <ValueNode>*this</ValueNode>
88 </LinkedListItems>
89 </Expand>
90 </Type>
91 <Type Name="clang::FieldDecl">
92 <DisplayString>Field {{{*(clang::NamedDecl *)this,view(cpp)nd}}}</DisplayString>
93 </Type>
94 <Type Name="clang::CXXMethodDecl">
95 <DisplayString>Method {{{*(clang::NamedDecl *)this,view(cpp)nd}}}</DisplayString>
96 </Type>
97 <Type Name="clang::CXXConstructorDecl">
98 <DisplayString>Constructor {{{*(clang::NamedDecl *)this,view(cpp)nd}}}</DisplayString>
99 </Type>
100 <Type Name="clang::CXXDestructorDecl">
101 <DisplayString>Destructor {{{*(clang::NamedDecl *)this,view(cpp)nd}}}</DisplayString>
102 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000103 <Type Name="clang::NamedDecl" >
104 <DisplayString IncludeView="cpp">{Name,view(cpp)}</DisplayString>
105 <DisplayString>{Name}</DisplayString>
106 </Type>
107 <Type Name="clang::TagDecl">
108 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Struct">struct {Name,view(cpp)}</DisplayString>
109 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Interface">interface {Name,view(cpp)}</DisplayString>
110 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Union">union {Name,view(cpp)}</DisplayString>
111 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Class">class {Name,view(cpp)}</DisplayString>
112 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Enum">enum {Name,view(cpp)}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000113 <Expand>
114 <ExpandedItem>(clang::DeclContext *)this</ExpandedItem>
115 </Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000116 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000117 <Type Name="clang::TagType">
118 <DisplayString>{*decl}</DisplayString>
119 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000120 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000121 <Item Name="decl">decl</Item>
122 </Expand>
123 </Type>
124 <Type Name="clang::RecordType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000125 <DisplayString>{*(clang::TagType *)this}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000126 <Expand>
127 <Item Name="TagType">*(clang::TagType *)this</Item>
128 </Expand>
129 </Type>
130 <Type Name="clang::SubstTemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000131 <DisplayString>{*Replaced,view(cpp)} &lt;= {CanonicalType,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000132 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000133 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000134 <Item Name="Replaced">*Replaced</Item>
135 </Expand>
136 </Type>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000137 <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)
138 but the expansion has all parameters -->
139 <Type Name="clang::FunctionProtoType">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000140 <DisplayString IncludeView="retType">{ResultType,view(cpp)}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000141 <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
142 <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>
143 <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
144 <DisplayString IncludeView="parm1">, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}</DisplayString>
145 <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
146 <DisplayString IncludeView="parm2">, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}</DisplayString>
147 <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
148 <DisplayString IncludeView="parm3">, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}</DisplayString>
149 <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
150 <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>
151 <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
152 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000153 <DisplayString>{*this,view(retType)}({*this,view(parm0)})</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000154 <Expand>
155 <Item Name="ReturnType">ResultType</Item>
156 <Synthetic Name="Parameter Types">
157 <DisplayString>{*this,view(parm0)}</DisplayString>
158 <Expand>
159 <ArrayItems>
160 <Size>NumParams</Size>
161 <ValuePointer>(clang::QualType *)(this+1)</ValuePointer>
162 </ArrayItems>
163 </Expand>
164 </Synthetic>
165 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
166 </Expand>
167 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000168 <Type Name="clang::TemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000169 <DisplayString>typename {*TTPDecl,view(cpp)}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000170 </Type>
171 <Type Name="clang::QualType">
Mike Spertus288daa52016-03-08 16:14:23 +0000172 <!-- TODO: Qualifiers. Also, when VS2013 support is deprecated, change 4 to clang::TypeAlignmentInBits (not properly recognized by VS2013) -->
Mike Spertus01b14bf2016-03-16 14:27:50 +0000173 <DisplayString IncludeView="poly">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(poly)}</DisplayString>
174 <DisplayString IncludeView="cpp">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000175 <DisplayString>{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType}</DisplayString>
176 <Expand>
177 <Item Name="BaseType">*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType</Item>
178 </Expand>
179 </Type>
180 <Type Name="clang::TemplateArgumentLoc">
181 <DisplayString>{Argument}</DisplayString>
182 <Expand>
183 <ExpandedItem>Argument</ExpandedItem>
184 </Expand>
185 </Type>
186 <Type Name="clang::TemplateArgument">
187 <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template parameter: {*(clang::QualType *)&amp;TypeOrValue.V}</DisplayString>
188 <Expand>
189 <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&amp;TypeOrValue.V</Item>
190 <!-- TODO: Other kinds-->
191 </Expand>
192 </Type>
Mike Spertus1d051ee2016-03-20 00:32:30 +0000193 <!-- Builtin types that have C++ keywords are manually displayed as that keyword. Otherwise, just use the enum name -->
Mike Spertus288daa52016-03-08 16:14:23 +0000194 <Type Name="clang::BuiltinType">
Mike Spertus1d051ee2016-03-20 00:32:30 +0000195 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>
196 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Bool">bool</DisplayString>
197 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_U">char</DisplayString>
198 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UChar">unsigned char</DisplayString>
199 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_U">wchar_t</DisplayString>
200 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char16">char16_t</DisplayString>
201 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char32">char32_t</DisplayString>
202 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UShort">unsigned short</DisplayString>
203 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt">unsigned int</DisplayString>
204 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULong">unsigned long</DisplayString>
205 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULongLong">unsigned long long</DisplayString>
206 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt128">__uint128_t</DisplayString>
207 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_S">char</DisplayString>
208 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::SChar">signed char</DisplayString>
209 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_S">wchar_t</DisplayString>
210 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Short">short</DisplayString>
211 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int">int</DisplayString>
212 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Long">long</DisplayString>
213 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongLong">long long</DisplayString>
214 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int128">__int128_t</DisplayString>
215 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Half">__fp16</DisplayString>
216 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Float">float</DisplayString>
217 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Double">double</DisplayString>
218 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongDouble">long double</DisplayString>
219 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::NullPtr">nullptr_t</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000220 <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>
221 <Expand>
222 <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>
223 </Expand>
224 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000225
Mike Spertus288daa52016-03-08 16:14:23 +0000226 <Type Name="clang::TemplateSpecializationType">
227 <DisplayString Condition="(Template.Storage.Val.Val.Value &amp; 3) != 3 &amp;&amp; (Template.Storage.Val.Val.Value &amp; 2) != 2 &amp;&amp; (Template.Storage.Val.Val.Value &amp; 1) != 1">{(clang::TemplateDecl *)((Template.Storage.Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
228 <DisplayString>{Template.Storage}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000229 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000230 <Type Name="clang::IdentifierInfo">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000231 <DisplayString Condition="Entry != 0">{((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,sb}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000232 <Expand>
233 <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,s</Item>
234 <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
235 </Expand>
236 </Type>
237 <Type Name="clang::DeclarationName">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000238 <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000239 <DisplayString Condition="Ptr == 0">Empty</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000240 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000241 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
242 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
243 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000244 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra">{{Extra ({(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask))-&gt;ExtraKindOrNumArgs})}}</DisplayString>
245 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000246 <Item Condition="(Ptr &amp; PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
247 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
248 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000249 <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask))-&gt;ExtraKindOrNumArgs</Item>
Mike Spertus288daa52016-03-08 16:14:23 +0000250 </Expand>
251 </Type>
252 <Type Name="clang::Token">
253 <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>
254 <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>
255 </Type>
256 <Type Name="clang::DeclSpec">
257 <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000258 </Type>
259 <Type Name="clang::PragmaHandler">
260 <DisplayString>{Name,s}</DisplayString>
261 </Type>
262 <Type Name="clang::FileEntry">
263 <DisplayString>{Name,s}</DisplayString>
264 </Type>
265 <Type Name="clang::DirectoryEntry">
266 <DisplayString>{Name,s}</DisplayString>
267 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000268 <Type Name="clang::VarDecl::VarDeclBitfields">
269 <Expand>
270 <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
271 <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
272 <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
273 </Expand>
274 </Type>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000275 <Type Name="clang::DeclaratorDecl">
276 <DisplayString>{DeclType,view(cpp)} {Name,view(cpp)}</DisplayString>
277 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000278 <Type Name="clang::VarDecl">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000279 <DisplayString>{*(DeclaratorDecl*)this,nd}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000280 <Expand>
281 <ExpandedItem>*(DeclaratorDecl*)this,nd</ExpandedItem>
282 <Item Name="VarDeclBits">VarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000283 </Expand>
284 </Type>
285 <Type Name="clang::ParmVarDecl">
286 <DisplayString>{*(VarDecl*)this,nd}</DisplayString>
287 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000288 <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000289 <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>
290 </Expand>
291 </Type>
292 <Type Name="clang::FunctionDecl">
293 <DisplayString IncludeView="retType">{*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType,view(retType)}</DisplayString>
294 <DisplayString IncludeView="parm0" Condition="0 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
295 <DisplayString IncludeView="parm0">{*ParamInfo[0]}{*this,view(parm1)}</DisplayString>
296 <DisplayString IncludeView="parm1" Condition="1 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
297 <DisplayString IncludeView="parm1">, {*ParamInfo[1]}{*this,view(parm2)}</DisplayString>
298 <DisplayString IncludeView="parm2" Condition="2 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
299 <DisplayString IncludeView="parm2">, {*ParamInfo[2]}{*this,view(parm3)}</DisplayString>
300 <DisplayString IncludeView="parm3" Condition="3 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
301 <DisplayString IncludeView="parm3">, {*ParamInfo[3]}{*this,view(parm4)}</DisplayString>
302 <DisplayString IncludeView="parm4" Condition="4 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
303 <DisplayString IncludeView="parm4">, {*ParamInfo[4]}{*this,view(parm5)}</DisplayString>
304 <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
305 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
306 <DisplayString>{*this,view(retType)} {Name,view(cpp)}({*this,view(parm0)})</DisplayString>
307 <Expand>
308 <Item Name="ReturnType">*this,view(retType)</Item>
309 <Synthetic Name="Parameter Types">
310 <DisplayString>{*this,view(parm0)}</DisplayString>
311 <Expand>
312 <ArrayItems>
313 <Size>((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams</Size>
314 <ValuePointer>ParamInfo</ValuePointer>
315 </ArrayItems>
316 </Expand>
317 </Synthetic>
318 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000319 </Expand>
320 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000321 <Type Name="clang::OpaquePtr&lt;*&gt;">
322 <DisplayString>{($T1 *)Ptr</DisplayString>
323 <Expand>
324 <ExpandedItem>($T1 *)Ptr</ExpandedItem>
325 </Expand>
326 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000327</AutoVisualizer>