blob: 411d7a2be2104c451bc7814c0c1fe04da0e816aa [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 Spertus6601a442016-03-28 18:03:37 +00005For Visual Studio 2013 only, put this file into
6"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic link so it updates automatically.
7
8For later versions of Visual Studio, no setup is required-->
Aaron Ballman83f197b2014-01-24 19:46:45 +00009<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
Mike Spertus01b14bf2016-03-16 14:27:50 +000010
Aaron Ballman9d214542015-09-29 17:32:36 +000011 <Type Name="clang::Type">
Mike Spertus01b14bf2016-03-16 14:27:50 +000012 <!-- To visualize clang::Types, we need to look at TypeBits.TC to determine the actual
13 type subclass and manually dispatch accordingly (Visual Studio can't identify the real type
14 because clang::Type has no virtual members hence no RTTI).
15
16 Views:
17 "cmn": Visualization that is common to all clang::Type subclasses
18 "poly": Visualization that is specific to the actual clang::Type subclass. The subtype-specific
19 <DisplayString> is typically as C++-like as possible (like in dump()) with <Expand>
20 containing all the gory details.
21 "cpp": Only occasionally used when we need to distinguish between an ordinary view and a C++-like view.
22 -->
23 <DisplayString IncludeView="cmn">{(clang::Type::TypeClass)TypeBits.TC, en}Type</DisplayString>
24 <!-- Dispatch to visualizers for the actual Type subclass -->
25 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin" IncludeView="poly">{*(clang::BuiltinType *)this}</DisplayString>
26 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
27 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference" IncludeView="poly">{*(clang::LValueReferenceType *)this}</DisplayString>
28 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference" IncludeView="poly">{*(clang::RValueReferenceType *)this}</DisplayString>
29 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
30 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>
31 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm" IncludeView="poly">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>
32 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +000033 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000034 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{*(clang::FunctionProtoType *)this}</DisplayString>
Mike Spertusa9ab71c2016-03-29 09:24:45 +000035 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization" IncludeView="poly">{*(clang::TemplateSpecializationType *)this}</DisplayString>
36 <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName" IncludeView="poly">{*(clang::InjectedClassNameType *)this}</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +000037 <DisplayString IncludeView="cpp">{*this,view(poly)}</DisplayString>
Mike Spertusa9ab71c2016-03-29 09:24:45 +000038 <DisplayString IncludeView="poly">{*this,view(cmn)}</DisplayString> <!-- Not yet implemented Type subclass -->
Mike Spertus01b14bf2016-03-16 14:27:50 +000039 <DisplayString>{*this,view(cmn)} {{{*this,view(poly)}}}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +000040 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +000041 <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>
42 <Item Name="Flags" IncludeView="cmn">TypeBits</Item>
43 <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>
44 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>
45 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>
46 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>
47 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>
48 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>
49 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>
50 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>
51 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>
Mike Spertus7f2de8e2016-03-20 00:20:43 +000052 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>
Mike Spertusa9ab71c2016-03-29 09:24:45 +000053 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization">(clang::TemplateSpecializationType *)this</ExpandedItem>
54 <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName">(clang::InjectedClassNameType *)this</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +000055 </Expand>
56 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +000057 <Type Name="clang::PointerType">
58 <DisplayString>{PointeeType, view(poly)} *</DisplayString>
59 <Expand>
60 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
61 <Item Name="PointeeType">PointeeType</Item>
62 </Expand>
63 </Type>
64 <!-- We visualize all inner types for clang reference types. So a rvalue reference to an lvalue reference
65 to an int would visual as int &amp; &amp;&amp; This is a little different than GetPointeeType(),
66 but more clearly displays the data structure and seems natural -->
67 <Type Name="clang::LValueReferenceType">
68 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;</DisplayString>
69 <Expand>
70 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
71 <Item Name="PointeeType">PointeeType</Item>
72 </Expand>
73 </Type>
74 <Type Name="clang::RValueReferenceType">
75 <DisplayString>{((clang::ReferenceType *)this)-&gt;PointeeType,view(cpp)} &amp;&amp;</DisplayString>
76 <Expand>
77 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
78 <Item Name="PointeeType">PointeeType</Item>
79 </Expand>
80 </Type>
81 <Type Name="clang::AttributedType">
82 <DisplayString>{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>
83 </Type>
Mike Spertusa814d3d2016-03-18 16:38:34 +000084
85 <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
86 <Type Name="clang::DeclContext">
87 <DisplayString>{(clang::Decl::Kind)DeclKind,en}Decl</DisplayString>
88 <Expand>
89 <Item Name="DeclKind">(clang::Decl::Kind)DeclKind,en</Item>
Mike Spertus32e9a322016-03-22 02:29:22 +000090 <Synthetic Name="Members">
91 <DisplayString></DisplayString>
92 <Expand>
93 <LinkedListItems>
94 <HeadPointer>FirstDecl</HeadPointer>
95 <NextPointer>(clang::Decl *)(NextInContextAndBits.Value &amp; ~3)</NextPointer>
96 <ValueNode>*this</ValueNode>
97 </LinkedListItems>
98 </Expand>
99 </Synthetic>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000100 </Expand>
101 </Type>
102 <Type Name="clang::FieldDecl">
Mike Spertus85a8abe2016-03-23 17:29:42 +0000103 <DisplayString>Field {{{*(clang::DeclaratorDecl *)this,view(cpp)nd}}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000104 </Type>
105 <Type Name="clang::CXXMethodDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000106 <DisplayString IncludeView="cpp">{*(clang::FunctionDecl *)this,nd}</DisplayString>
107 <DisplayString>Method {{{*this,view(cpp)}}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000108 </Type>
109 <Type Name="clang::CXXConstructorDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000110 <DisplayString>Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000111 </Type>
112 <Type Name="clang::CXXDestructorDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000113 <DisplayString>Destructor {{~{Name,view(cpp)}()}}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000114 </Type>
Mike Spertus1796c2e2016-03-29 10:57:24 +0000115 <Type Name="clang::TemplateTypeParmDecl">
116 <DisplayString Condition="!Typename">class {Name,view(cpp)}</DisplayString>
117 <DisplayString>typename {Name,view(cpp)}</DisplayString>
118 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000119 <Type Name="clang::NamedDecl" >
120 <DisplayString IncludeView="cpp">{Name,view(cpp)}</DisplayString>
121 <DisplayString>{Name}</DisplayString>
122 </Type>
123 <Type Name="clang::TagDecl">
Mike Spertus32e9a322016-03-22 02:29:22 +0000124 <DisplayString IncludeView="implicit" Condition="Implicit">implicit{" ",sb}</DisplayString>
125 <DisplayString IncludeView="implicit"></DisplayString>
126 <DisplayString IncludeView="modifiers">{*this,view(implicit)}</DisplayString>
127 <DisplayString IncludeView="cpp">{*this,view(modifiers)}{Name,view(cpp)}</DisplayString>
128 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Struct">{*this,view(modifiers)}struct {Name,view(cpp)}</DisplayString>
129 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Interface">{*this,view(modifiers)}interface {Name,view(cpp)}</DisplayString>
130 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Union">{*this,view(modifiers)}union {Name,view(cpp)}</DisplayString>
131 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Class">{*this,view(modifiers)}class {Name,view(cpp)}</DisplayString>
132 <DisplayString Condition="TagDeclKind==clang::TagTypeKind::TTK_Enum">{*this,view(modifiers)}enum {Name,view(cpp)}</DisplayString>
Mike Spertusa814d3d2016-03-18 16:38:34 +0000133 <Expand>
134 <ExpandedItem>(clang::DeclContext *)this</ExpandedItem>
135 </Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000136 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000137 <Type Name="clang::TagType">
Mike Spertus32e9a322016-03-22 02:29:22 +0000138 <DisplayString IncludeView="cpp">{*decl,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000139 <DisplayString>{*decl}</DisplayString>
140 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000141 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000142 <Item Name="decl">decl</Item>
143 </Expand>
144 </Type>
145 <Type Name="clang::RecordType">
Mike Spertus32e9a322016-03-22 02:29:22 +0000146 <DisplayString IncludeView="cpp">{*(clang::TagType *)this,view(cpp)}</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000147 <DisplayString>{*(clang::TagType *)this}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000148 <Expand>
149 <Item Name="TagType">*(clang::TagType *)this</Item>
150 </Expand>
151 </Type>
152 <Type Name="clang::SubstTemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000153 <DisplayString>{*Replaced,view(cpp)} &lt;= {CanonicalType,view(cpp)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000154 <Expand>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000155 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Mike Spertus288daa52016-03-08 16:14:23 +0000156 <Item Name="Replaced">*Replaced</Item>
157 </Expand>
158 </Type>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000159 <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)
160 but the expansion has all parameters -->
161 <Type Name="clang::FunctionProtoType">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000162 <DisplayString IncludeView="retType">{ResultType,view(cpp)}</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000163 <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
164 <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>
165 <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
166 <DisplayString IncludeView="parm1">, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}</DisplayString>
167 <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
168 <DisplayString IncludeView="parm2">, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}</DisplayString>
169 <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
170 <DisplayString IncludeView="parm3">, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}</DisplayString>
171 <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
172 <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>
173 <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
174 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000175 <DisplayString>{*this,view(retType)}({*this,view(parm0)})</DisplayString>
Mike Spertus7f2de8e2016-03-20 00:20:43 +0000176 <Expand>
177 <Item Name="ReturnType">ResultType</Item>
178 <Synthetic Name="Parameter Types">
179 <DisplayString>{*this,view(parm0)}</DisplayString>
180 <Expand>
181 <ArrayItems>
182 <Size>NumParams</Size>
183 <ValuePointer>(clang::QualType *)(this+1)</ValuePointer>
184 </ArrayItems>
185 </Expand>
186 </Synthetic>
187 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
188 </Expand>
189 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000190 <Type Name="clang::TemplateTypeParmType">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000191 <DisplayString>typename {*TTPDecl,view(cpp)}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000192 </Type>
Mike Spertusa9ab71c2016-03-29 09:24:45 +0000193 <Type Name="clang::InjectedClassNameType">
194 <DisplayString>{*Decl,view(cpp)}</DisplayString>
195 <Expand>
196 <Item Name="Decl">Decl</Item>
197 <Item Name="InjectedType">InjectedType</Item>
198 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
199 </Expand>
200 </Type>
Aaron Ballman9d214542015-09-29 17:32:36 +0000201 <Type Name="clang::QualType">
Mike Spertus8758c9d2016-03-24 00:38:54 +0000202 <!-- When VS2013 support is deprecated, change 4 to clang::TypeAlignmentInBits (not properly recognized by VS2013) -->
203 <DisplayString IncludeView="poly">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(poly)}{*this,view(fastQuals)}</DisplayString>
204 <DisplayString IncludeView="cpp">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(cpp)}{*this,view(fastQuals)}</DisplayString>
205 <!-- For the Fast Qualifiers, it is simpler (and probably more efficient) just to list all 8 cases than create
206 views for each qualifier. TODO: Non-fast qualifiers -->
207 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==0"></DisplayString>
208 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==1">{" ",sb}const</DisplayString>
209 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==2">{" ",sb}restrict</DisplayString>
210 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==3">{" ",sb}const restrict</DisplayString>
211 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==4">{" ",sb}volatile</DisplayString>
212 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==5">{" ",sb}const volatile</DisplayString>
213 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==6">{" ",sb}volatile restrict</DisplayString>
214 <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==7">{" ",sb}const volatile restrict</DisplayString>
215 <DisplayString IncludeView="fastQuals">Cannot visualize non-fast qualifiers</DisplayString>
216 <DisplayString>{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType}{*this,view(fastQuals)}</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000217 <Expand>
Mike Spertus8758c9d2016-03-24 00:38:54 +0000218 <Item Name="Fast Quals">*this,view(fastQuals)</Item>
Mike Spertus288daa52016-03-08 16:14:23 +0000219 <Item Name="BaseType">*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType</Item>
220 </Expand>
221 </Type>
222 <Type Name="clang::TemplateArgumentLoc">
223 <DisplayString>{Argument}</DisplayString>
224 <Expand>
225 <ExpandedItem>Argument</ExpandedItem>
226 </Expand>
227 </Type>
228 <Type Name="clang::TemplateArgument">
229 <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template parameter: {*(clang::QualType *)&amp;TypeOrValue.V}</DisplayString>
230 <Expand>
231 <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&amp;TypeOrValue.V</Item>
232 <!-- TODO: Other kinds-->
233 </Expand>
234 </Type>
Mike Spertus1d051ee2016-03-20 00:32:30 +0000235 <!-- 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 +0000236 <Type Name="clang::BuiltinType">
Mike Spertus1d051ee2016-03-20 00:32:30 +0000237 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>
238 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Bool">bool</DisplayString>
239 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_U">char</DisplayString>
240 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UChar">unsigned char</DisplayString>
241 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_U">wchar_t</DisplayString>
242 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char16">char16_t</DisplayString>
243 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char32">char32_t</DisplayString>
244 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UShort">unsigned short</DisplayString>
245 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt">unsigned int</DisplayString>
246 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULong">unsigned long</DisplayString>
247 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULongLong">unsigned long long</DisplayString>
248 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt128">__uint128_t</DisplayString>
249 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_S">char</DisplayString>
250 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::SChar">signed char</DisplayString>
251 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_S">wchar_t</DisplayString>
252 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Short">short</DisplayString>
253 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int">int</DisplayString>
254 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Long">long</DisplayString>
255 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongLong">long long</DisplayString>
256 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int128">__int128_t</DisplayString>
257 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Half">__fp16</DisplayString>
258 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Float">float</DisplayString>
259 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Double">double</DisplayString>
260 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongDouble">long double</DisplayString>
261 <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::NullPtr">nullptr_t</DisplayString>
Mike Spertus288daa52016-03-08 16:14:23 +0000262 <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>
263 <Expand>
264 <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>
265 </Expand>
266 </Type>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000267
Mike Spertus288daa52016-03-08 16:14:23 +0000268 <Type Name="clang::TemplateSpecializationType">
269 <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>
270 <DisplayString>{Template.Storage}</DisplayString>
Aaron Ballman9d214542015-09-29 17:32:36 +0000271 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000272 <Type Name="clang::IdentifierInfo">
Mike Spertus01b14bf2016-03-16 14:27:50 +0000273 <DisplayString Condition="Entry != 0">{((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,sb}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000274 <Expand>
275 <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry&lt;clang::IdentifierInfo *&gt;*)Entry)+1,s</Item>
276 <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
277 </Expand>
278 </Type>
279 <Type Name="clang::DeclarationName">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000280 <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000281 <DisplayString Condition="Ptr == 0">Empty</DisplayString>
Mike Spertus01b14bf2016-03-16 14:27:50 +0000282 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000283 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
284 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
285 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000286 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra"
287 IncludeView="cpp">{*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask),view(cpp)}</DisplayString>
288 <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000289 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000290 <Item Condition="(Ptr &amp; PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
291 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
292 <Item Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
Mike Spertus32e9a322016-03-22 02:29:22 +0000293 <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)</Item>
Mike Spertus288daa52016-03-08 16:14:23 +0000294 </Expand>
295 </Type>
Mike Spertus32e9a322016-03-22 02:29:22 +0000296 <Type Name="clang::DeclarationNameExtra">
297 <DisplayString IncludeView="cpp"
298 Condition="ExtraKindOrNumArgs &gt;= clang::DeclarationNameExtra::CXXConstructor
299 &amp;&amp; ExtraKindOrNumArgs &lt;= clang::DeclarationNameExtra::CXXConversionFunction"
300 >{((clang::CXXSpecialName *)this)-&gt;Type,view(cpp)}</DisplayString>
301 <DisplayString>{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{" ",sb}{*this,view(cpp)}</DisplayString>
302 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000303 <Type Name="clang::Token">
304 <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>
305 <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>
306 </Type>
307 <Type Name="clang::DeclSpec">
308 <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000309 </Type>
310 <Type Name="clang::PragmaHandler">
311 <DisplayString>{Name,s}</DisplayString>
312 </Type>
313 <Type Name="clang::FileEntry">
314 <DisplayString>{Name,s}</DisplayString>
315 </Type>
316 <Type Name="clang::DirectoryEntry">
317 <DisplayString>{Name,s}</DisplayString>
318 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000319 <Type Name="clang::VarDecl::VarDeclBitfields">
320 <Expand>
321 <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
322 <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
323 <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
324 </Expand>
325 </Type>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000326 <Type Name="clang::DeclaratorDecl">
327 <DisplayString>{DeclType,view(cpp)} {Name,view(cpp)}</DisplayString>
328 </Type>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000329 <Type Name="clang::VarDecl">
Mike Spertus6fa3e592016-03-20 20:15:23 +0000330 <DisplayString>{*(DeclaratorDecl*)this,nd}</DisplayString>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000331 <Expand>
332 <ExpandedItem>*(DeclaratorDecl*)this,nd</ExpandedItem>
333 <Item Name="VarDeclBits">VarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000334 </Expand>
335 </Type>
336 <Type Name="clang::ParmVarDecl">
337 <DisplayString>{*(VarDecl*)this,nd}</DisplayString>
338 <Expand>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000339 <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000340 <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>
341 </Expand>
342 </Type>
343 <Type Name="clang::FunctionDecl">
344 <DisplayString IncludeView="retType">{*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType,view(retType)}</DisplayString>
345 <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 +0000346 <DisplayString IncludeView="parm0">{*ParamInfo[0]}{*this,view(parm1)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000347 <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 +0000348 <DisplayString IncludeView="parm1">, {*ParamInfo[1]}{*this,view(parm2)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000349 <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 +0000350 <DisplayString IncludeView="parm2">, {*ParamInfo[2]}{*this,view(parm3)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000351 <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 +0000352 <DisplayString IncludeView="parm3">, {*ParamInfo[3]}{*this,view(parm4)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000353 <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 +0000354 <DisplayString IncludeView="parm4">, {*ParamInfo[4]}{*this,view(parm5)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000355 <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams"></DisplayString>
356 <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
Mike Spertus32e9a322016-03-22 02:29:22 +0000357 <DisplayString>{*this,view(retType)nd} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000358 <Expand>
Mike Spertus32e9a322016-03-22 02:29:22 +0000359 <Item Name="ReturnType">*this,view(retType)nd</Item>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000360 <Synthetic Name="Parameter Types">
Mike Spertus32e9a322016-03-22 02:29:22 +0000361 <DisplayString>{*this,view(parm0)nd}</DisplayString>
Mike Spertus6fa3e592016-03-20 20:15:23 +0000362 <Expand>
363 <ArrayItems>
364 <Size>((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;NumParams</Size>
365 <ValuePointer>ParamInfo</ValuePointer>
366 </ArrayItems>
367 </Expand>
368 </Synthetic>
369 <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
Zachary Turnerdfa871b2014-06-26 16:26:42 +0000370 </Expand>
371 </Type>
Mike Spertus288daa52016-03-08 16:14:23 +0000372 <Type Name="clang::OpaquePtr&lt;*&gt;">
373 <DisplayString>{($T1 *)Ptr</DisplayString>
374 <Expand>
375 <ExpandedItem>($T1 *)Ptr</ExpandedItem>
376 </Expand>
377 </Type>
Mike Spertus1796c2e2016-03-29 10:57:24 +0000378 <Type Name="clang::TemplateParameterList">
379 <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
380 <DisplayString IncludeView="parm0">{*((NamedDecl **)(this+1))[0],view(cpp)}{*this,view(parm1)}</DisplayString>
381 <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
382 <DisplayString IncludeView="parm1">, {*((NamedDecl **)(this+1))[1],view(cpp)}{*this,view(parm2)}</DisplayString>
383 <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
384 <DisplayString IncludeView="parm2">, {*((NamedDecl **)(this+1))[2],view(cpp)}{*this,view(parm3)}</DisplayString>
385 <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
386 <DisplayString IncludeView="parm3">, {*((NamedDecl **)(this+1))[3],view(cpp)}{*this,view(parm4)}</DisplayString>
387 <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
388 <DisplayString IncludeView="parm4">, {*((NamedDecl **)(this+1))[4],view(cpp)}{*this,view(parm5)}</DisplayString>
389 <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
390 <DisplayString IncludeView="parm5">, /* Expand for more params */</DisplayString>
391 <DisplayString>&lt;{*this,view(parm0)}&gt;</DisplayString>
392 <Expand>
393 <ArrayItems>
394 <Size>NumParams</Size>
395 <ValuePointer>(NamedDecl **)(this+1)</ValuePointer>
396 </ArrayItems>
397 </Expand>
398 </Type>
Aaron Ballman83f197b2014-01-24 19:46:45 +0000399</AutoVisualizer>