]> granicus.if.org Git - clang/commitdiff
Fix MSVC visualizations for ActionResult and OpaquePtr
authorMike Spertus <mike@spertus.com>
Thu, 3 Jan 2019 23:24:39 +0000 (23:24 +0000)
committerMike Spertus <mike@spertus.com>
Thu, 3 Jan 2019 23:24:39 +0000 (23:24 +0000)
Mainly just fixing buggy code. Also removed unnecessary visualizers
for specializations of OpaquePtr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350371 91177308-0d34-0410-b5e6-96231b3b80d8

utils/ClangVisualizers/clang.natvis

index 7ddcb5db5fa2569974b5b23c93aa6ab86a90c476..24c4715cca64bb43edf8df301138cebef1581b15 100644 (file)
@@ -492,18 +492,6 @@ For later versions of Visual Studio, no setup is required-->
       <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>\r
     </Expand>\r
   </Type>\r
-  <Type Name="clang::OpaquePtr&lt;clang::QualType&gt;">\r
-    <DisplayString>{*(clang::QualType *)this}</DisplayString>\r
-    <Expand>\r
-      <Item Name="Ptr">*(clang::QualType *)this</Item>\r
-    </Expand>\r
-  </Type>\r
-  <Type Name="clang::UnionOpaquePtr&lt;clang::QualType&gt;">\r
-    <DisplayString>{*(clang::QualType *)this}</DisplayString>\r
-    <Expand>\r
-      <Item Name="Ptr">*(clang::QualType *)this</Item>\r
-    </Expand>\r
-  </Type>\r
   <Type Name="clang::OpaquePtr&lt;*&gt;">\r
     <DisplayString>{($T1 *)Ptr}</DisplayString>\r
     <Expand>\r
@@ -568,30 +556,18 @@ For later versions of Visual Studio, no setup is required-->
     <DisplayString Condition="ResultKind == clang::LookupResult::Ambiguous">{Ambiguity,en}: {Decls}</DisplayString>\r
     <DisplayString>{ResultKind,en}: {Decls}</DisplayString>\r
   </Type>\r
-  <Type Name="clang::ActionResult&lt;*&gt;" IncludeView="packedValidity">\r
-    <DisplayString Condition="PtrWithInvalid&amp;1">Invalid</DisplayString>\r
-    <DisplayString Condition="!(PtrWithInvalid&amp;1)">Valid</DisplayString>\r
-   </Type>\r
-  <Type Name="clang::ActionResult&lt;*&gt;" IncludeView="unpackedValidity">\r
+  <Type Name="clang::ActionResult&lt;*, 0&gt;">\r
     <DisplayString Condition="Invalid">Invalid</DisplayString>\r
-    <DisplayString Condition="!Invalid">Valid</DisplayString>\r
+    <DisplayString Condition="!*(void **)&amp;Val">Unset</DisplayString>\r
+    <DisplayString>{Val}</DisplayString>\r
   </Type>\r
-  <Type Name="clang::ActionResult&lt;*&gt;" IncludeView="packed">\r
-    <DisplayString>{*this,view(packedValidity)}: {($T1 *)(PtrWithInvalid&amp;~1)}</DisplayString>\r
+  <Type Name="clang::ActionResult&lt;*, 1&gt;">\r
+    <DisplayString Condition="PtrWithInvalid&amp;1">Invalid</DisplayString>\r
+    <DisplayString Condition="!PtrWithInvalid">Unset</DisplayString>\r
+    <DisplayString>{($T1)(PtrWithInvalid&amp;~1)}</DisplayString>\r
     <Expand>\r
       <Item Name="Invalid">(bool)(PtrWithInvalid&amp;1)</Item>\r
-      <Item Name="Val">($T1 *)(PtrWithInvalid&amp;~1)</Item>\r
-    </Expand>\r
-  </Type>\r
-  <Type Name="clang::ActionResult&lt;*&gt;" IncludeView="unpacked">\r
-    <DisplayString>{*this,view(unpackedValidity)}: {Val}</DisplayString>\r
-  </Type>\r
-  <Type Name="clang::ActionResult&lt;*&gt;">\r
-    <DisplayString Condition="$T2">{*this,view(packed)}</DisplayString>\r
-    <DisplayString Condition="!$T2">{*this,view(unpacked)}</DisplayString>\r
-    <Expand>\r
-      <ExpandedItem Condition="$T2">*this,view(packed)</ExpandedItem>\r
-      <ExpandedItem Condition="!$T2">*this,view(unpacked)</ExpandedItem>\r
+      <Item Name="Val">($T1)(PtrWithInvalid&amp;~1)</Item>\r
     </Expand>\r
   </Type>\r
 </AutoVisualizer>\r