Visual Studio native visualizer for InjectedClassNameType
authorMike Spertus <mike@spertus.com>
Tue, 29 Mar 2016 09:24:45 +0000 (09:24 +0000)
committerMike Spertus <mike@spertus.com>
Tue, 29 Mar 2016 09:24:45 +0000 (09:24 +0000)
Also fixes some omissions for TemplateSpecializationType

llvm-svn: 264710

clang/utils/ClangVisualizers/clang.natvis

index 3ce3d67..ab99328 100644 (file)
@@ -32,8 +32,10 @@ For later versions of Visual Studio, no setup is required-->
     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>\r
     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>\r
     <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{*(clang::FunctionProtoType *)this}</DisplayString>\r
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization" IncludeView="poly">{*(clang::TemplateSpecializationType *)this}</DisplayString>\r
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName" IncludeView="poly">{*(clang::InjectedClassNameType *)this}</DisplayString>\r
     <DisplayString IncludeView="cpp">{*this,view(poly)}</DisplayString>\r
-    <DisplayString IncludeView="poly">{*this,view(cmn)}"</DisplayString> <!-- Not yet implemented Type subclass -->\r
+    <DisplayString IncludeView="poly">{*this,view(cmn)}</DisplayString> <!-- Not yet implemented Type subclass -->\r
     <DisplayString>{*this,view(cmn)}  {{{*this,view(poly)}}}</DisplayString>\r
     <Expand>\r
       <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>\r
@@ -48,6 +50,8 @@ For later versions of Visual Studio, no setup is required-->
       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>\r
       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>\r
       <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>\r
+      <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization">(clang::TemplateSpecializationType *)this</ExpandedItem>\r
+      <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName">(clang::InjectedClassNameType *)this</ExpandedItem>\r
     </Expand>\r
   </Type>\r
   <Type Name="clang::PointerType">\r
@@ -182,6 +186,14 @@ For later versions of Visual Studio, no setup is required-->
   <Type Name="clang::TemplateTypeParmType">\r
     <DisplayString>typename {*TTPDecl,view(cpp)}</DisplayString>\r
   </Type>\r
+  <Type Name="clang::InjectedClassNameType">\r
+    <DisplayString>{*Decl,view(cpp)}</DisplayString>\r
+    <Expand>\r
+      <Item Name="Decl">Decl</Item>\r
+      <Item Name="InjectedType">InjectedType</Item>\r
+      <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>\r
+    </Expand>\r
+  </Type>\r
   <Type Name="clang::QualType">\r
     <!-- When VS2013 support is deprecated, change 4 to clang::TypeAlignmentInBits (not properly recognized by VS2013) -->\r
     <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>\r