riccibruno created this revision.
riccibruno added a reviewer: aaron.ballman.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.

`[AST] Various optimizations in DeclarationName(Table)` changed how 
`DeclarationName`s
are represented. Therefore `clang.natvis` needs to be updated to reflect these 
changes.

This is completely untested since I actually don't have access to a windows 
machine.
However it should be close enough to a working fix.


Repository:
  rC Clang

https://reviews.llvm.org/D55737

Files:
  utils/ClangVisualizers/clang.natvis


Index: utils/ClangVisualizers/clang.natvis
===================================================================
--- utils/ClangVisualizers/clang.natvis
+++ utils/ClangVisualizers/clang.natvis
@@ -392,25 +392,32 @@
     <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
     <DisplayString Condition="Ptr == 0">Empty</DisplayString>
     <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier" 
IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr &amp; 
~PtrMask)}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr &amp; 
~PtrMask)})}}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr &amp; ~PtrMask)})}}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr &amp; ~PtrMask)})}}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredIdentifier">Identifier {*(clang::IdentifierInfo *)(Ptr &amp; 
~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredObjCZeroArgSelector">ObjC Zero Arg Selector {*(clang::IdentifierInfo 
*)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredObjCOneArgSelector">ObjC One Arg Selector {*(clang::IdentifierInfo *)(Ptr 
&amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredCXXConstructorName">C++ Constructor {*(clang::detail::CXXSpecialNameExtra 
*)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredCXXDestructorName">C++ Destructor {*(clang::detail::CXXSpecialNameExtra 
*)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredCXXConversionFunctionName">C++ Conversion function 
{*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredCXXOperatorName">C++ Operator {*(clang::detail::CXXOperatorIdName *)(Ptr 
&amp; ~PtrMask)}</DisplayString>
     <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredDeclarationNameExtra"
                    IncludeView="cpp">{*(clang::DeclarationNameExtra *)(Ptr 
&amp; ~PtrMask),view(cpp)}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredDeclarationNameExtra">{{Extra ({*(clang::DeclarationNameExtra *)(Ptr 
&amp; ~PtrMask)})}}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == 
StoredDeclarationNameExtra">Extra {*(clang::detail::DeclarationNameExtra *)(Ptr 
&amp; ~PtrMask)}</DisplayString>
     <Expand>
       <Item Condition="(Ptr &amp; PtrMask) == StoredIdentifier" 
Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
       <Item Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector" 
Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; 
~PtrMask)</Item>
       <Item Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector" 
Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; 
~PtrMask)</Item>
-      <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" 
Name="[Extra]">(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)</Item>
-    </Expand>
-  </Type>
-  <Type Name="clang::DeclarationNameExtra">
-    <DisplayString IncludeView="cpp"
-                   Condition="ExtraKindOrNumArgs &gt;= 
clang::DeclarationNameExtra::CXXConstructor 
-                   &amp;&amp; ExtraKindOrNumArgs &lt;= 
clang::DeclarationNameExtra::CXXConversionFunction"
-                   >{((clang::CXXSpecialName 
*)this)-&gt;Type,view(cpp)}</DisplayString>
-    
<DisplayString>{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"
  ",sb}{*this,view(cpp)}</DisplayString>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXConstructorName" 
Name="[C++ Constructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; 
~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXDestructorName" 
Name="[C++ Destructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; 
~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXConversionFunctionName" 
Name="[C++ Conversion function]">*(clang::detail::CXXSpecialNameExtra *)(Ptr 
&amp; ~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXOperatorName" 
Name="[C++ Operator]">*(clang::detail::CXXOperatorIdName *)(Ptr &amp; 
~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" 
Name="[Extra]">*(clang::detail::DeclarationNameExtra *)(Ptr &amp; 
~PtrMask)</Item>
+    </Expand>
+  </Type>
+  <Type Name="clang::detail::DeclarationNameExtra">
+    <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">C++ 
Deduction guide</DisplayString>
+    <DisplayString Condition="ExtraKindOrNumArgs == 
CXXLiteralOperatorName">C++ Literal operator</DisplayString>
+    <DisplayString Condition="ExtraKindOrNumArgs == CXXUsingDirective">C++ 
Using directive</DisplayString>
+    
<DisplayString>{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"
  ",sb}{*this,view(cpp)}</DisplayString>
   </Type>
   <Type Name="clang::Token">
     <DisplayString Condition="Kind != 
clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>


Index: utils/ClangVisualizers/clang.natvis
===================================================================
--- utils/ClangVisualizers/clang.natvis
+++ utils/ClangVisualizers/clang.natvis
@@ -392,25 +392,32 @@
     <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
     <DisplayString Condition="Ptr == 0">Empty</DisplayString>
     <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredIdentifier">Identifier {*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector">ObjC Zero Arg Selector {*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector">ObjC One Arg Selector {*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredCXXConstructorName">C++ Constructor {*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredCXXDestructorName">C++ Destructor {*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredCXXConversionFunctionName">C++ Conversion function {*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredCXXOperatorName">C++ Operator {*(clang::detail::CXXOperatorIdName *)(Ptr &amp; ~PtrMask)}</DisplayString>
     <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra"
                    IncludeView="cpp">{*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask),view(cpp)}</DisplayString>
-    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)})}}</DisplayString>
+    <DisplayString Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra">Extra {*(clang::detail::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)}</DisplayString>
     <Expand>
       <Item Condition="(Ptr &amp; PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
       <Item Condition="(Ptr &amp; PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
       <Item Condition="(Ptr &amp; PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr &amp; ~PtrMask)</Item>
-      <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)</Item>
-    </Expand>
-  </Type>
-  <Type Name="clang::DeclarationNameExtra">
-    <DisplayString IncludeView="cpp"
-                   Condition="ExtraKindOrNumArgs &gt;= clang::DeclarationNameExtra::CXXConstructor 
-                   &amp;&amp; ExtraKindOrNumArgs &lt;= clang::DeclarationNameExtra::CXXConversionFunction"
-                   >{((clang::CXXSpecialName *)this)-&gt;Type,view(cpp)}</DisplayString>
-    <DisplayString>{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"  ",sb}{*this,view(cpp)}</DisplayString>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXConstructorName" Name="[C++ Constructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXDestructorName" Name="[C++ Destructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXConversionFunctionName" Name="[C++ Conversion function]">*(clang::detail::CXXSpecialNameExtra *)(Ptr &amp; ~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredCXXOperatorName" Name="[C++ Operator]">*(clang::detail::CXXOperatorIdName *)(Ptr &amp; ~PtrMask)</Item>
+      <Item Condition="(Ptr &amp; PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">*(clang::detail::DeclarationNameExtra *)(Ptr &amp; ~PtrMask)</Item>
+    </Expand>
+  </Type>
+  <Type Name="clang::detail::DeclarationNameExtra">
+    <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">C++ Deduction guide</DisplayString>
+    <DisplayString Condition="ExtraKindOrNumArgs == CXXLiteralOperatorName">C++ Literal operator</DisplayString>
+    <DisplayString Condition="ExtraKindOrNumArgs == CXXUsingDirective">C++ Using directive</DisplayString>
+    <DisplayString>{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"  ",sb}{*this,view(cpp)}</DisplayString>
   </Type>
   <Type Name="clang::Token">
     <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to