[PATCH] D55737: [Utils] Attempt to fix clang.natvis following "[AST] Various optimizations in DeclarationName(Table)"
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 15 05:46:38 PST 2018
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 & PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">Identifier {*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">ObjC Zero Arg Selector {*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">ObjC One Arg Selector {*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConstructorName">C++ Constructor {*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXDestructorName">C++ Destructor {*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName">C++ Conversion function {*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXOperatorName">C++ Operator {*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask)}</DisplayString>
<DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra"
IncludeView="cpp">{*(clang::DeclarationNameExtra *)(Ptr & ~PtrMask),view(cpp)}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::DeclarationNameExtra *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">Extra {*(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask)}</DisplayString>
<Expand>
<Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
<Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
<Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
- <Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra *)(Ptr & ~PtrMask)</Item>
- </Expand>
- </Type>
- <Type Name="clang::DeclarationNameExtra">
- <DisplayString IncludeView="cpp"
- Condition="ExtraKindOrNumArgs >= clang::DeclarationNameExtra::CXXConstructor
- && ExtraKindOrNumArgs <= clang::DeclarationNameExtra::CXXConversionFunction"
- >{((clang::CXXSpecialName *)this)->Type,view(cpp)}</DisplayString>
- <DisplayString>{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{" ",sb}{*this,view(cpp)}</DisplayString>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXConstructorName" Name="[C++ Constructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXDestructorName" Name="[C++ Destructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName" Name="[C++ Conversion function]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXOperatorName" Name="[C++ Operator]">*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">*(clang::detail::DeclarationNameExtra *)(Ptr & ~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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55737.178358.patch
Type: text/x-patch
Size: 5449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181215/e66f96a4/attachment.bin>
More information about the cfe-commits
mailing list