blob: 7abc7fa363012b21d322dbd8ac02e3ca17e0fa6a [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 Spertus32e9a322016-03-22 02:29:22 +000032 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000033 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{*(clang::FunctionProtoType *)this}</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +000034 <DisplayString IncludeView="cpp">{*this,view(poly)}</DisplayString>
35 <DisplayString IncludeView="poly">{*this,view(cmn)}"</DisplayString> <!-- Not yet implemented Type subclass -->
36 <DisplayString>{*this,view(cmn)} {{{*this,view(poly)}}}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +000037 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +000038 <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>
39 <Item Name="Flags" IncludeView="cmn">TypeBits</Item>
40 <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>
41 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>
42 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>
43 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>
44 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>
45 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>
46 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>
47 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>
48 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000049 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +000050 </Expand>
51 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +000052 <Type Name="clang::PointerType">
53 <DisplayString>{PointeeType, view(poly)} *</DisplayString>
54 <Expand>
55 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
56 <Item Name="PointeeType">PointeeType</Item>
57 </Expand>
58 </Type>
59 <!-- We visualize all inner types for clang reference types. So a rvalue reference to an lvalue reference
60 to an int would visual as int &amp; &amp;&amp; This is a little different than GetPointeeType(),
61 but more clearly displays the data structure and seems natural -->
62 <Type Name="clang::LValueReferenceType">
63 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;</DisplayString>
64 <Expand>
65 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
66 <Item Name="PointeeType">PointeeType</Item>
67 </Expand>
68 </Type>
69 <Type Name="clang::RValueReferenceType">
70 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;&amp;</DisplayString>
71 <Expand>
72 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
73 <Item Name="PointeeType">PointeeType</Item>
74 </Expand>
75 </Type>
76 <Type Name="clang::AttributedType">
77 <DisplayString>{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>
78 </Type>
Mike Spertusa814d3d2016-03-18 16:38:34 +000079
80 <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
81 <Type Name="clang::DeclContext">
82 <DisplayString>{(clang::Decl::Kind)DeclKind,en}Decl</DisplayString>
83 <Expand>
84 <Item Name="DeclKind">(clang::Decl::Kind)DeclKind,en</Item>
Mike Spertus32e9a322016-03-22 02:29:22 +000085 <Synthetic Name="Members">
86 <DisplayString></DisplayString>
87 <Expand>
88 <LinkedListItems>
89 <HeadPointer>FirstDecl</HeadPointer>
90 <NextPointer>(clang::Decl *)(NextInContextAndBits.Value &amp; ~3)</NextPointer>
91 <ValueNode>*this</ValueNode>
92 </LinkedListItems>
93 </Expand>
94 </Synthetic>
Mike Spertusa814d3d2016-03-18 16:38:34 +000095 </Expand>
96 </Type>
97 <Type Name="clang::FieldDecl">
98 <DisplayString>Field {{{*(clang::NamedDecl *)this,view(cpp)nd}}}</DisplayString>
99 </Type>
100 <Type Name="clang::CXXMethodDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000101 <DisplayString IncludeView="cpp">{*(clang::FunctionDecl *)this,nd}</DisplayString>
102 <DisplayString>Method {{{*this,view(cpp)}}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000103 </Type>
104 <Type Name="clang::CXXConstructorDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000105 <DisplayString>Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000106 </Type>
107 <Type Name="clang::CXXDestructorDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000108 <DisplayString>Destructor {{~{Name,view(cpp)}()}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000109 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000110 <Type Name="clang::NamedDecl" >
111 <DisplayString IncludeView="cpp">{Name,view(cpp)}</DisplayString>
112 <DisplayString>{Name}</DisplayString>
113 </Type>
114 <Type Name="clang::TagDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000115 <DisplayString IncludeView="implicit" Condition="Implicit">implicit{" ",sb}</DisplayString>
116 <DisplayString IncludeView="implicit"></DisplayString>
117 <DisplayString IncludeView="modifiers">{*this,view(implicit)}</DisplayString>
118 <DisplayString IncludeView="cpp">{*this,view(modifiers)}{Name,view(cpp)}</DisplayString>
119 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Struct">{*this,view(modifiers)}struct {Name,view(cpp)}</DisplayString>
120 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Interface">{*this,view(modifiers)}interface {Name,view(cpp)}</DisplayString>
121 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Union">{*this,view(modifiers)}union {Name,view(cpp)}</DisplayString>
122 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Class">{*this,view(modifiers)}class {Name,view(cpp)}</DisplayString>
123 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Enum">{*this,view(modifiers)}enum {Name,view(cpp)}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000124 <Expand>
125 <ExpandedItem>(clang::DeclContext *)this</ExpandedItem>
126 </Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000127 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000128 <Type Name="clang::TagType">
Mike Spertus32e9a322016-03-22 02:29:22 +0000129 <DisplayString IncludeView="cpp">{*decl,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000130 <DisplayString>{*decl}</DisplayString>
131 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000132 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000133 <Item Name="decl">decl</Item>
134 </Expand>
135 </Type>
136 <Type Name="clang::RecordType">
Mike Spertus32e9a322016-03-22 02:29:22 +0000137 <DisplayString IncludeView="cpp">{*(clang::TagType *)this,view(cpp)}</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000138 <DisplayString>{*(clang::TagType *)this}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000139 <Expand>
140 <Item Name="TagType">*(clang::TagType *)this</Item>
141 </Expand>
142 </Type>
143 <Type Name="clang::SubstTemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000144 <DisplayString>{*Replaced,view(cpp)} &lt;= {CanonicalType,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000145 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000146 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000147 <Item Name="Replaced">*Replaced</Item>
148 </Expand>
149 </Type>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000150 <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)
151 but the expansion has all parameters -->
152 <Type Name="clang::FunctionProtoType">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000153 <DisplayString IncludeView="retType">{ResultType,view(cpp)}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000154 <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
155 <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>
156 <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
157 <DisplayString IncludeView="parm1">, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}</DisplayString>
158 <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
159 <DisplayString IncludeView="parm2">, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}</DisplayString>
160 <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
161 <DisplayString IncludeView="parm3">, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}</DisplayString>
162 <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
163 <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>
164 <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
165 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000166 <DisplayString>{*this,view(retType)}({*this,view(parm0)})</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000167 <Expand>
168 <Item Name="ReturnType">ResultType</Item>
169 <Synthetic Name="Parameter Types">
170 <DisplayString>{*this,view(parm0)}</DisplayString>
171 <Expand>
172 <ArrayItems>
173 <Size>NumParams</Size>
174 <ValuePointer>(clang::QualType *)(this+1)</ValuePointer>
175 </ArrayItems>
176 </Expand>
177 </Synthetic>
178 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
179 </Expand>
180 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000181 <Type Name="clang::TemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000182 <DisplayString>typename {*TTPDecl,view(cpp)}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000183 </Type>
184 <Type Name="clang::QualType">
Mike Spertus288daa52016-03-08 16:14:23 +0000185 <!-- 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 +0000186 <DisplayString IncludeView="poly">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(poly)}</DisplayString>
187 <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 +0000188 <DisplayString>{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType}</DisplayString>
189 <Expand>
190 <Item Name="BaseType">*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType</Item>
191 </Expand>
192 </Type>
193 <Type Name="clang::TemplateArgumentLoc">
194 <DisplayString>{Argument}</DisplayString>
195 <Expand>
196 <ExpandedItem>Argument</ExpandedItem>
197 </Expand>
198 </Type>
199 <Type Name="clang::TemplateArgument">
200 <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template parameter: {*(clang::QualType *)&amp;TypeOrValue.V}</DisplayString>
201 <Expand>
202 <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&amp;TypeOrValue.V</Item>
203 <!-- TODO: Other kinds-->
204 </Expand>
205 </Type>
Mike Spertus1d051ee2016-03-20 00:32:30 +0000206 <!-- 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 +0000207 <Type Name="clang::BuiltinType">
Mike Spertus1d051ee2016-03-20 00:32:30 +0000208 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>
209 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Bool">bool</DisplayString>
210 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_U">char</DisplayString>
211 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UChar">unsigned char</DisplayString>
212 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_U">wchar_t</DisplayString>
213 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char16">char16_t</DisplayString>
214 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char32">char32_t</DisplayString>
215 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UShort">unsigned short</DisplayString>
216 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt">unsigned int</DisplayString>
217 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULong">unsigned long</DisplayString>
218 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULongLong">unsigned long long</DisplayString>
219 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt128">__uint128_t</DisplayString>
220 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_S">char</DisplayString>
221 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::SChar">signed char</DisplayString>
222 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_S">wchar_t</DisplayString>
223 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Short">short</DisplayString>
224 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int">int</DisplayString>
225 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Long">long</DisplayString>
226 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongLong">long long</DisplayString>
227 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int128">__int128_t</DisplayString>
228 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Half">__fp16</DisplayString>
229 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Float">float</DisplayString>
230 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Double">double</DisplayString>
231 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongDouble">long double</DisplayString>
232 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::NullPtr">nullptr_t</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000233 <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>
234 <Expand>
235 <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>
236 </Expand>
237 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000238
Mike Spertus288daa52016-03-08 16:14:23 +0000239 <Type Name="clang::TemplateSpecializationType">
240 <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>
241 <DisplayString>{Template.Storage}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000242 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000243 <Type Name="clang::IdentifierInfo">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000244 <DisplayString Condition="Entry != 0">{((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,sb}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000245 <Expand>
246 <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,s</Item>
247 <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
248 </Expand>
249 </Type>
250 <Type Name="clang::DeclarationName">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000251 <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000252 <DisplayString Condition="Ptr == 0">Empty</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000253 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000254 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
255 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
256 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000257 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra"
258 IncludeView="cpp">{*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask),view(cpp)}</DisplayString>
259 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000260 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000261 <Item Condition="(Ptr &amp; PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
262 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
263 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
Mike Spertus32e9a322016-03-22 02:29:22 +0000264 <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)</Item>
Mike Spertus288daa52016-03-08 16:14:23 +0000265 </Expand>
266 </Type>
Mike Spertus32e9a322016-03-22 02:29:22 +0000267 <Type Name="clang::DeclarationNameExtra">
268 <DisplayString IncludeView="cpp"
269 Condition="ExtraKindOrNumArgs &gt;= clang::DeclarationNameExtra::CXXConstructor
270 &amp;&amp; ExtraKindOrNumArgs &lt;= clang::DeclarationNameExtra::CXXConversionFunction"
271 >{((clang::CXXSpecialName *)this)-&gt;Type,view(cpp)}</DisplayString>
272 <DisplayString>{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{" ",sb}{*this,view(cpp)}</DisplayString>
273 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000274 <Type Name="clang::Token">
275 <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>
276 <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>
277 </Type>
278 <Type Name="clang::DeclSpec">
279 <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000280 </Type>
281 <Type Name="clang::PragmaHandler">
282 <DisplayString>{Name,s}</DisplayString>
283 </Type>
284 <Type Name="clang::FileEntry">
285 <DisplayString>{Name,s}</DisplayString>
286 </Type>
287 <Type Name="clang::DirectoryEntry">
288 <DisplayString>{Name,s}</DisplayString>
289 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000290 <Type Name="clang::VarDecl::VarDeclBitfields">
291 <Expand>
292 <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
293 <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
294 <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
295 </Expand>
296 </Type>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000297 <Type Name="clang::DeclaratorDecl">
298 <DisplayString>{DeclType,view(cpp)} {Name,view(cpp)}</DisplayString>
299 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000300 <Type Name="clang::VarDecl">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000301 <DisplayString>{*(DeclaratorDecl*)this,nd}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000302 <Expand>
303 <ExpandedItem>*(DeclaratorDecl*)this,nd</ExpandedItem>
304 <Item Name="VarDeclBits">VarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000305 </Expand>
306 </Type>
307 <Type Name="clang::ParmVarDecl">
308 <DisplayString>{*(VarDecl*)this,nd}</DisplayString>
309 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000310 <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000311 <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>
312 </Expand>
313 </Type>
314 <Type Name="clang::FunctionDecl">
315 <DisplayString IncludeView="retType">{*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType,view(retType)}</DisplayString>
316 <DisplayString IncludeView="parm0" Condition="0 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000317 <DisplayString IncludeView="parm0">{*ParamInfo[0]}{*this,view(parm1)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000318 <DisplayString IncludeView="parm1" Condition="1 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000319 <DisplayString IncludeView="parm1">, {*ParamInfo[1]}{*this,view(parm2)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000320 <DisplayString IncludeView="parm2" Condition="2 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000321 <DisplayString IncludeView="parm2">, {*ParamInfo[2]}{*this,view(parm3)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000322 <DisplayString IncludeView="parm3" Condition="3 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000323 <DisplayString IncludeView="parm3">, {*ParamInfo[3]}{*this,view(parm4)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000324 <DisplayString IncludeView="parm4" Condition="4 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000325 <DisplayString IncludeView="parm4">, {*ParamInfo[4]}{*this,view(parm5)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000326 <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
327 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000328 <DisplayString>{*this,view(retType)nd} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000329 <Expand>
Mike Spertus32e9a322016-03-22 02:29:22 +0000330 <Item Name="ReturnType">*this,view(retType)nd</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000331 <Synthetic Name="Parameter Types">
Mike Spertus32e9a322016-03-22 02:29:22 +0000332 <DisplayString>{*this,view(parm0)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000333 <Expand>
334 <ArrayItems>
335 <Size>((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams</Size>
336 <ValuePointer>ParamInfo</ValuePointer>
337 </ArrayItems>
338 </Expand>
339 </Synthetic>
340 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000341 </Expand>
342 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000343 <Type Name="clang::OpaquePtr&lt;*&gt;">
344 <DisplayString>{($T1 *)Ptr</DisplayString>
345 <Expand>
346 <ExpandedItem>($T1 *)Ptr</ExpandedItem>
347 </Expand>
348 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000349</AutoVisualizer>