From: Mike Spertus Date: Fri, 5 Jul 2019 21:41:30 +0000 (+0000) Subject: Improve MSVC visualization of annot_template_id tokens X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d92f4b318e5974b1a23f13f0f8c4ec5e5cc1f3c;p=clang Improve MSVC visualization of annot_template_id tokens Now shows the actual annotated template. E.g., {annot_template_id (A)} Also a few miscellaneous fixes to visualizers of other types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365248 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/ClangVisualizers/clang.natvis b/utils/ClangVisualizers/clang.natvis index fdfd45184d..42b674e7d7 100644 --- a/utils/ClangVisualizers/clang.natvis +++ b/utils/ClangVisualizers/clang.natvis @@ -52,8 +52,9 @@ For later versions of Visual Studio, no setup is required--> {*(clang::InjectedClassNameType *)this} {*(clang::DependentNameType *)this} {*(clang::PackExpansionType *)this} - {*(clang::LocInfoType *)this} - {*this,view(poly)} + {(clang::LocInfoType *)this,na} + {(clang::LocInfoType *)this,view(cpp)na} + {this,view(poly)na} {*this,view(cpp)} No visualizer yet for {(clang::Type::TypeClass)TypeBits.TC,en}Type @@ -222,7 +223,31 @@ For later versions of Visual Studio, no setup is required--> {(TypedefNameDecl *)this,view(name)nand} using {(TypedefNameDecl *)this,view(name)nand} = {(TypedefNameDecl *)this,view(type)nand} - + + {Name} + + + Kind={(UncommonTemplateNameStorage::Kind)Kind,en}, Size={Size} + + (UncommonTemplateNameStorage::Kind)Kind + Size + + + + {Bits}, + {this,view(cmn)na},{(OverloadedTemplateStorage*)this,na} + {this,view(cmn)na},{(AssumedTemplateStorage*)this,na} + {this,view(cmn)na},{(SubstTemplateTemplateParmStorage*)this,na} + {this,view(cmn)na},{(SubstTemplateTemplateParmPackStorage*)this,na} + {this,view(cmn)na} + + Bits + (OverloadedTemplateStorage*)this + (AssumedTemplateStorage*)this + (SubstTemplateTemplateParmStorage*)this + (SubstTemplateTemplateParmPackStorage*)this + + {Storage,na} @@ -290,7 +315,7 @@ For later versions of Visual Studio, no setup is required--> ({*this,view(parm0)}) {this,view(left)na}{this,view(right)na} - ResultType + ResultType {*this,view(parm0)} @@ -324,10 +349,11 @@ For later versions of Visual Studio, no setup is required--> Non-canonical: {*TTPDecl} Canonical: {CanTTPTInfo} + *(clang::Type *)this, view(cmn) - {*Decl,view(cpp)} + {InjectedType,view(cpp)} Decl InjectedType @@ -384,7 +410,8 @@ For later versions of Visual Studio, no setup is required--> - {*DeclInfo} + {DeclInfo,view(cpp)na} + {DeclInfo,na} DeclInfo *(clang::Type *)this, view(cmn) @@ -420,9 +447,11 @@ For later versions of Visual Studio, no setup is required--> , {Args.Args[2],view(cpp)}, ... {*this,view(arg0cpp)} {*this,view(arg0)} + {(clang::Expr *)TypeOrValue.V,view(cpp)na} {(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} *(clang::QualType *)&TypeOrValue.V + (clang::Expr *)TypeOrValue.V Args.NumArgs Args.Args @@ -468,6 +497,7 @@ For later versions of Visual Studio, no setup is required--> + {(clang::QualType *)Arg,view(cpp)na} Type template argument: {*(clang::QualType *)Arg} Non-type template argument: {*(clang::Expr *)Arg} Template template argument: {*(clang::TemplateName *)Arg @@ -604,7 +634,7 @@ For later versions of Visual Studio, no setup is required--> {Template->TemplatedDecl,view(cpp)} - C++ Deduction guide for {Template->TemplatedDecl,view(cpp)} + C++ Deduction guide for {Template->TemplatedDecl,view(cpp)na} {Type,view(cpp)} @@ -613,9 +643,32 @@ For later versions of Visual Studio, no setup is required--> {Name} + + + {(ParsedTemplateArgument *)(this+1),view(cpp)na}{this,view(arg1)na} + + , {((ParsedTemplateArgument *)(this+1))+1,view(cpp)na}{this,view(arg2)na} + + , ... + {Name,na}<{this,view(arg0)na}> + + Name + + {this,view(arg0)na} + + + NumArgs + (ParsedTemplateArgument *)(this+1) + + + + Operator + + - {(clang::tok::TokenKind)Kind,en} - {{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}} + {{annot_template_id ({(clang::TemplateIdAnnotation *)(PtrData),na})}} + {{Identifier ({(clang::IdentifierInfo *)(PtrData),na})}} + {(clang::tok::TokenKind)Kind,en} [{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]