r247442 - Extend the Token visualizer used by MSVC to display the identifier text for tok::identifier tokens.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 11 11:35:18 PDT 2015
Author: aaronballman
Date: Fri Sep 11 13:35:18 2015
New Revision: 247442
URL: http://llvm.org/viewvc/llvm-project?rev=247442&view=rev
Log:
Extend the Token visualizer used by MSVC to display the identifier text for tok::identifier tokens.
Patch by Mike Spertus.
Modified:
cfe/trunk/utils/clang.natvis
Modified: cfe/trunk/utils/clang.natvis
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=247442&r1=247441&r2=247442&view=diff
==============================================================================
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Fri Sep 11 13:35:18 2015
@@ -24,13 +24,14 @@ or create a symbolic link so it updates
<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::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs</Item>
- </Expand>
- </Type>
- <Type Name="clang::Token">
- <DisplayString>{(clang::tok::TokenKind)Kind}</DisplayString>
- </Type>
- <Type Name="clang::DeclSpec">
- <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
+ </Expand>
+ </Type>
+ <Type Name="clang::Token">
+ <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind}</DisplayString>
+ <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>
+ </Type>
+ <Type Name="clang::DeclSpec">
+ <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
</Type>
<Type Name="clang::PragmaHandler">
<DisplayString>{Name,s}</DisplayString>
More information about the cfe-commits
mailing list