Various improvements to Clang MSVC Visualizer

This change adds/improves MSVC visualizers for many Clang types, including array types, trailing return types in function, deduction guides, a fix for OpaquePtr, etc. It also replaces all of the view(deref) with the "na" formatter, which is a better built-in natvis technique for doing the same thing. 

Differential Revision: https://reviews.llvm.org/D63039



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363574 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/ClangVisualizers/clang.natvis b/utils/ClangVisualizers/clang.natvis
index 17556f9..dab3c31 100644
--- a/utils/ClangVisualizers/clang.natvis
+++ b/utils/ClangVisualizers/clang.natvis
@@ -27,18 +27,32 @@
     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference" IncludeView="poly">{*(clang::LValueReferenceType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference" IncludeView="poly">{*(clang::RValueReferenceType *)this}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="poly">{(clang::ConstantArrayType *)this,na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="left">{(clang::ConstantArrayType *)this,view(left)na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="right">{(clang::ConstantArrayType *)this,view(right)na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="poly">{(clang::IncompleteArrayType *)this,na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="left">{(clang::IncompleteArrayType *)this,view(left)na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="right">{(clang::IncompleteArrayType *)this,view(right)na}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="poly">{(clang::DecayedType *)this,na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="left">{(clang::DecayedType *)this,view(left)na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="right">{(clang::DecayedType *)this,view(right)na}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="cpp">{*(clang::TemplateTypeParmType *)this,view(cpp)}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm" IncludeView="poly">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>

-    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{*(clang::FunctionProtoType *)this}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{(clang::FunctionProtoType *)this,na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="left">{(clang::FunctionProtoType *)this,view(left)na}</DisplayString>

+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="right">{(clang::FunctionProtoType *)this,view(right)na}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization" IncludeView="poly">{*(clang::TemplateSpecializationType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization" IncludeView="poly">{*(clang::DeducedTemplateSpecializationType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName" IncludeView="poly">{*(clang::InjectedClassNameType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::PackExpansion" IncludeView="poly">{*(clang::PackExpansionType *)this}</DisplayString>

     <DisplayString Condition="TypeBits.TC==clang::LocInfoType::LocInfo" IncludeView="poly">{*(clang::LocInfoType *)this}</DisplayString>

     <DisplayString IncludeView="cpp">{*this,view(poly)}</DisplayString>

+    <DisplayString IncludeView="left">{*this,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="right"></DisplayString>

     <DisplayString IncludeView="poly">No visualizer yet for {(clang::Type::TypeClass)TypeBits.TC,en}Type</DisplayString> <!-- Not yet implemented Type subclass -->

     <DisplayString IncludeView="Dependent" Condition="TypeBits.Dependent">Dependent{" ",sb}</DisplayString>

     <DisplayString IncludeView="Dependent"></DisplayString>

@@ -62,13 +76,16 @@
     <DisplayString>{*this,view(cmn)}  {{{*this,view(poly)}}}</DisplayString>

     <Expand>

       <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>

-      <Item Name="Flags" IncludeView="cmn">*this,view(flags)</Item>

+      <Item Name="Flags" IncludeView="cmn">this,view(flags)na</Item>

       <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>

+      <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray">(clang::ConstantArrayType *)this</ExpandedItem>

+      <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray">(clang::IncompleteArrayType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>

+      <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Decayed">(clang::DecayedType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>

       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>

@@ -80,6 +97,28 @@
       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::LocInfoType::LocInfo">(clang::LocInfoType *)this</ExpandedItem>

     </Expand>

   </Type>

+  <Type Name="clang::ArrayType">

+    <Expand>

+      <Item Name="ElementType">ElementType</Item>

+    </Expand>

+  </Type>

+  <Type Name="clang::ConstantArrayType">

+    <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="right">[{Size}]</DisplayString>

+    <DisplayString>{ElementType,view(cpp)}[{Size}]</DisplayString>

+    <Expand>

+      <Item Name="Size">Size</Item>

+      <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>

+    </Expand>

+  </Type>

+  <Type Name="clang::IncompleteArrayType">

+    <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="right">[]</DisplayString>

+    <DisplayString>{ElementType,view(cpp)}[]</DisplayString>

+    <Expand>

+      <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>

+    </Expand>

+  </Type>

   <Type Name="clang::PointerType">

     <DisplayString>{PointeeType, view(poly)} *</DisplayString>

     <Expand>

@@ -110,9 +149,9 @@
   

   <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->

   <Type Name="clang::DeclContext">

-    <DisplayString>{(clang::Decl::Kind)DeclKind,en}Decl</DisplayString>

+    <DisplayString>{(clang::Decl::Kind)DeclContextBits.DeclKind,en}Decl</DisplayString>

     <Expand>

-      <Item Name="DeclKind">(clang::Decl::Kind)DeclKind,en</Item>

+      <Item Name="DeclKind">(clang::Decl::Kind)DeclContextBits.DeclKind,en</Item>

       <Synthetic Name="Members">

         <DisplayString></DisplayString>

         <Expand>

@@ -147,10 +186,14 @@
     <DisplayString>{*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)}</DisplayString> 

   </Type>

   <Type Name="clang::TemplateDecl">

-    <DisplayString>template{TemplateParams,view(deref)} {*TemplatedDecl};</DisplayString>

+    <DisplayString>template{TemplateParams,na} {*TemplatedDecl};</DisplayString>

+    <Expand>

+      <Item Name="TemplateParams">TemplateParams,na</Item>

+      <Item Name="TemplatedDecl">TemplatedDecl,na</Item>

+    </Expand>

   </Type>

   <Type Name="clang::TemplateName">

-    <DisplayString>{Storage,view(deref)}</DisplayString>

+    <DisplayString>{Storage,na}</DisplayString>

     <Expand>

       <ExpandedItem>Storage</ExpandedItem>

     </Expand>

@@ -174,7 +217,7 @@
     </Expand>

   </Type>

   <Type Name="clang::TagType">

-    <DisplayString IncludeView="cpp">{*decl,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="cpp">{decl,view(cpp)na}</DisplayString>

     <DisplayString>{*decl}</DisplayString>

     <Expand>

       <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>

@@ -182,8 +225,8 @@
     </Expand>

   </Type>

   <Type Name="clang::RecordType">

-    <DisplayString IncludeView="cpp">{*(clang::TagType *)this,view(cpp)}</DisplayString>

-    <DisplayString>{*(clang::TagType *)this}</DisplayString>

+    <DisplayString IncludeView="cpp">{(clang::TagType *)this,view(cpp)na}</DisplayString>

+    <DisplayString>{(clang::TagType *)this,na}</DisplayString>

     <Expand>

       <Item Name="TagType">*(clang::TagType *)this</Item>

     </Expand>

@@ -198,7 +241,8 @@
   <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)

        but the expansion has all parameters -->

   <Type Name="clang::FunctionProtoType">

-    <DisplayString IncludeView="retType">{ResultType,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="left" Condition="FunctionTypeBits.HasTrailingReturn"></DisplayString>

+    <DisplayString IncludeView="left">{ResultType,view(cpp)}</DisplayString>

     <DisplayString IncludeView="parm0" Condition="FunctionTypeBits.NumParams==0"></DisplayString>

     <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>

     <DisplayString IncludeView="parm1" Condition="FunctionTypeBits.NumParams==1"></DisplayString>

@@ -211,7 +255,9 @@
     <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>

     <DisplayString IncludeView="parm5" Condition="FunctionTypeBits.NumParams==5"></DisplayString>

     <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>

-    <DisplayString>{*this,view(retType)}({*this,view(parm0)})</DisplayString>

+    <DisplayString IncludeView="right" Condition="FunctionTypeBits.HasTrailingReturn">({*this,view(parm0)}) -&gt; {ResultType,view(cpp)}</DisplayString>

+    <DisplayString IncludeView="right">({*this,view(parm0)})</DisplayString>

+    <DisplayString>{this,view(left)na}{this,view(right)na}</DisplayString>

     <Expand>

       <Item Name="ReturnType">ResultType</Item>

       <Synthetic Name="Parameter Types">

@@ -226,8 +272,24 @@
       <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>

     </Expand>

   </Type>

+

+  <Type Name="clang::AdjustedType">

+    <DisplayString>{OriginalTy} adjusted to {AdjustedTy}</DisplayString>

+    <Expand>

+      <Item Name="OriginalTy">OriginalTy</Item>

+      <Item Name="AdjustedTy">AdjustedTy</Item>

+    </Expand>

+  </Type>

+  <Type Name="clang::DecayedType">

+    <DisplayString IncludeView="left">{OriginalTy,view(left)}</DisplayString>

+    <DisplayString IncludeView="right">{OriginalTy,view(right)}</DisplayString>

+    <DisplayString>{OriginalTy}</DisplayString>

+    <Expand>

+      <ExpandedItem>(clang::AdjustedType *)this</ExpandedItem>

+    </Expand>

+  </Type>

   <Type Name="clang::TemplateTypeParmType">

-    <DisplayString IncludeView="cpp" Condition="CanonicalType.Value.Value != this">{*TTPDecl}</DisplayString>

+    <DisplayString IncludeView="cpp" Condition="CanonicalType.Value.Value != this">{TTPDecl->Name,view(cpp)}</DisplayString>

     <DisplayString Condition="CanonicalType.Value.Value != this">Non-canonical: {*TTPDecl}</DisplayString>

     <DisplayString>Canonical: {CanTTPTInfo}</DisplayString>

     <Expand>

@@ -253,6 +315,8 @@
     <!-- When VS2013 support is deprecated, change 4 to clang::TypeAlignmentInBits (not properly recognized by VS2013) -->

     <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>

     <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>

+    <DisplayString IncludeView="left">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(left)}{*this,view(fastQuals)}</DisplayString>

+    <DisplayString IncludeView="right">{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,view(right)}{*this,view(fastQuals)}</DisplayString>

     <!-- For the Fast Qualifiers, it is simpler (and probably more efficient) just to list all 8 cases than create

           views for each qualifier. TODO: Non-fast qualifiers -->

     <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==0"></DisplayString>

@@ -265,10 +329,10 @@
     <DisplayString IncludeView="fastQuals" Condition="(Value.Value &amp; 15)==7">{" ",sb}const volatile restrict</DisplayString>

     <DisplayString IncludeView="fastQuals">Cannot visualize non-fast qualifiers</DisplayString>

     <DisplayString Condition="(uintptr_t)Value.Value == 0">Null</DisplayString>

-    <DisplayString>{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType}{*this,view(fastQuals)}</DisplayString>

+    <DisplayString>{((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType,na}{*this,view(fastQuals)}</DisplayString>

     <Expand>

       <Item Name="Fast Quals">*this,view(fastQuals)</Item>

-      <ExpandedItem>*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType</ExpandedItem>

+      <ExpandedItem>((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) &amp; ~(uintptr_t)((1 &lt;&lt; 4) - 1)))-&gt;BaseType</ExpandedItem>

     </Expand>

   </Type>

   <Type Name="clang::LocInfoType">

@@ -396,19 +460,20 @@
   </Type>

 

   <Type Name="clang::TemplateSpecializationType">

-    <DisplayString IncludeView="arg0" Condition="NumArgs==0"></DisplayString>

+    <DisplayString IncludeView="arg0" Condition="TemplateSpecializationTypeBits.NumArgs==0"></DisplayString>

     <DisplayString IncludeView="arg0">{((clang::TemplateArgument *)(this+1))[0],view(cpp)}{*this,view(arg1)}</DisplayString>

-    <DisplayString IncludeView="arg1" Condition="NumArgs==1"></DisplayString>

+    <DisplayString IncludeView="arg1" Condition="TemplateSpecializationTypeBits.NumArgs==1"></DisplayString>

     <DisplayString IncludeView="arg1">, {((clang::TemplateArgument *)(this+1))[1],view(cpp)}{*this,view(arg2)}</DisplayString>

-    <DisplayString IncludeView="arg2" Condition="NumArgs==2"></DisplayString>

+    <DisplayString IncludeView="arg2" Condition="TemplateSpecializationTypeBits.NumArgs==2"></DisplayString>

     <DisplayString IncludeView="arg2">, {((clang::TemplateArgument *)(this+1))[2],view(cpp)}{*this,view(arg3)}</DisplayString>

-    <DisplayString Condition="(Template.Storage.Val.Val.Value &amp; 3) == 0">

-      {*((clang::TemplateDecl *)((Template.Storage.Val.Val.Value &gt;&gt; 2) &lt;&lt; 2))->TemplatedDecl,view(cpp)}&lt;{*this,view(arg0)}&gt;

+    <DisplayString Condition="(Template.Storage.Val.Value &amp; 3) == 0">

+      {*((clang::TemplateDecl *)(Template.Storage.Val.Value))->TemplatedDecl,view(cpp)}&lt;{*this,view(arg0)}&gt;

     </DisplayString>

+    <DisplayString>Can't visualize this TemplateSpecializationType</DisplayString>

     <Expand>

       <Item Name="Template">Template.Storage</Item>

       <ArrayItems>

-        <Size>NumArgs</Size>

+        <Size>TemplateSpecializationTypeBits.NumArgs</Size>

         <ValuePointer>(clang::TemplateArgument *)(this+1)</ValuePointer>

       </ArrayItems>

     </Expand>

@@ -469,6 +534,7 @@
     </Expand>

   </Type>

   <Type Name="clang::detail::DeclarationNameExtra">

+    <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName" IncludeView="cpp">{(NamedDecl *)(((CXXDeductionGuideNameExtra *)this)->Template),view(cpp)nand}</DisplayString>

     <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">C++ Deduction guide</DisplayString>

     <DisplayString Condition="ExtraKindOrNumArgs == CXXLiteralOperatorName">C++ Literal operator</DisplayString>

     <DisplayString Condition="ExtraKindOrNumArgs == CXXUsingDirective">C++ Using directive</DisplayString>  

@@ -498,16 +564,16 @@
     </Expand>

   </Type>

   <Type Name="clang::DeclaratorDecl">

-    <DisplayString>{DeclType,view(cpp)} {Name,view(cpp)}</DisplayString>

+    <DisplayString>{DeclType,view(left)} {Name,view(cpp)}{DeclType,view(right)}</DisplayString>

     <Expand>

       <Item Name="Name">Name</Item>

       <Item Name="DeclType">DeclType</Item>

     </Expand>

   </Type>

   <Type Name="clang::VarDecl">

-    <DisplayString>{*(DeclaratorDecl*)this,nd}</DisplayString>

+    <DisplayString>{(DeclaratorDecl*)this,nand}</DisplayString>

     <Expand>

-      <ExpandedItem>*(DeclaratorDecl*)this,nd</ExpandedItem>

+      <ExpandedItem>(DeclaratorDecl*)this,nd</ExpandedItem>

       <Item Name="VarDeclBits">VarDeclBits</Item>

     </Expand>

   </Type>

@@ -518,22 +584,32 @@
       <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>

     </Expand>

   </Type>

+  <Type Name="clang::CXXDeductionGuideDecl">

+    <DisplayString>{Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nd}) -&gt; {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)->ResultType,view(cpp)}</DisplayString>

+    <Expand>

+      <ExpandedItem>(FunctionDecl*)this,nd</ExpandedItem>

+    </Expand>

+  </Type>

   <Type Name="clang::FunctionDecl">

-    <DisplayString IncludeView="retType">{*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType,view(retType)}</DisplayString>

+    <DisplayString IncludeView="retType">{((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)->ResultType,view(cpp)}</DisplayString>

     <DisplayString IncludeView="parm0" Condition="0 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

-    <DisplayString IncludeView="parm0">{*ParamInfo[0]}{*this,view(parm1)nd}</DisplayString>

+    <DisplayString IncludeView="parm0">{ParamInfo[0],na}{*this,view(parm1)nd}</DisplayString>

     <DisplayString IncludeView="parm1" Condition="1 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

-    <DisplayString IncludeView="parm1">, {*ParamInfo[1]}{*this,view(parm2)nd}</DisplayString>

+    <DisplayString IncludeView="parm1">, {ParamInfo[1],na}{*this,view(parm2)nd}</DisplayString>

     <DisplayString IncludeView="parm2" Condition="2 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

-    <DisplayString IncludeView="parm2">, {*ParamInfo[2]}{*this,view(parm3)nd}</DisplayString>

+    <DisplayString IncludeView="parm2">, {ParamInfo[2],na}{*this,view(parm3)nd}</DisplayString>

     <DisplayString IncludeView="parm3" Condition="3 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

-    <DisplayString IncludeView="parm3">, {*ParamInfo[3]}{*this,view(parm4)nd}</DisplayString>

+    <DisplayString IncludeView="parm3">, {ParamInfo[3],na}{*this,view(parm4)nd}</DisplayString>

     <DisplayString IncludeView="parm4" Condition="4 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

-    <DisplayString IncludeView="parm4">, {*ParamInfo[4]}{*this,view(parm5)nd}</DisplayString>

+    <DisplayString IncludeView="parm4">, {ParamInfo[4],na}{*this,view(parm5)nd}</DisplayString>

     <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.NumParams"></DisplayString>

     <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>

-    <DisplayString>{*this,view(retType)nd} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>

+    <DisplayString Condition="((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)-&gt;FunctionTypeBits.HasTrailingReturn">

+      auto {Name,view(cpp)nd}({*this,view(parm0)nd}) -&gt; {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) &amp; ~15))-&gt;BaseType)->ResultType,view(cpp)}

+    </DisplayString>

+    <DisplayString>{this,view(retType)nand} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>

     <Expand>

+      <ExpandedItem>(clang::DeclaratorDecl *)this,nd</ExpandedItem>

       <Item Name="ReturnType">*this,view(retType)nd</Item>

       <Synthetic Name="Parameter Types">

         <DisplayString>{*this,view(parm0)nd}</DisplayString>

@@ -547,9 +623,9 @@
     </Expand>

   </Type>

   <Type Name="clang::OpaquePtr&lt;*&gt;">

-    <DisplayString>{($T1 *)Ptr}</DisplayString>

+    <DisplayString>{*($T1*)&amp;Ptr}</DisplayString>

     <Expand>

-      <ExpandedItem>($T1 *)Ptr</ExpandedItem>

+      <ExpandedItem>($T1*)&amp;Ptr</ExpandedItem>

     </Expand>

   </Type>

   <Type Name="clang::UnionOpaquePtr&lt;*&gt;">

@@ -600,6 +676,47 @@
       <Item Name="decl">*(clang::NamedDecl *)(Ptr&amp;~Mask)</Item>

     </Expand>

   </Type>

+  <Type Name="clang::UnqualifiedId">

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_Identifier">[IK_Identifier] {*Identifier}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">[IK_OperatorFunctionId] {OperatorFunctionId}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">[IK_ConversionFunctionId] {ConversionFunctionId}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">[IK_ConstructorName] {ConstructorName}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DestructorName">[IK_DestructorName] {DestructorName}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">[IK_DeductionGuideName] {TemplateName}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_TemplateId">[IK_TemplateId] {TemplateId}</DisplayString>

+    <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">[IK_ConstructorTemplateId] {TemplateId}</DisplayString>

+    <DisplayString>Kind</DisplayString>

+    <Expand>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_Identifier">Identifier</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">OperatorFunctionId</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">ConversionFunctionId</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">ConstructorName</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DestructorName">DestructorName</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">TemplateName</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_TemplateId">TemplateId</ExpandedItem>

+      <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">TemplateId</ExpandedItem>

+    </Expand>

+  </Type>

+  <Type Name="clang::DeclGroup">

+    <DisplayString>NumDecls={NumDecls}</DisplayString>

+    <Expand>

+      <ArrayItems>

+        <Size>NumDecls</Size>

+        <ValuePointer>(Decl **)(this+1)</ValuePointer>

+      </ArrayItems>

+    </Expand>

+  </Type>

+  <Type Name="clang::DeclGroupRef">

+    <DisplayString Condition="(Kind)((uintptr_t)D&amp;1)==SingleDeclKind">{*D}</DisplayString>

+    <DisplayString>{*(DeclGroup *)((uintptr_t)D&amp;~1)}</DisplayString>

+    <Expand>

+      <ExpandedItem Condition="(Kind)((uintptr_t)D&amp;1)==SingleDeclKind">D</ExpandedItem>

+      <ExpandedItem Condition="(Kind)((uintptr_t)D&amp;1)==DeclGroupKind">(DeclGroup *)((uintptr_t)D&amp;~1)</ExpandedItem>

+    </Expand>

+  </Type>

+  <Type Name="clang::Declarator">

+    <DisplayString>{DS} {Name}</DisplayString>

+  </Type>

   <Type Name="clang::UnresolvedSet&lt;*&gt;">

     <DisplayString>{Decls}</DisplayString>

     <Expand>