From c79987635f19f3a77a1eafa68f0f198ff955f4c3 Mon Sep 17 00:00:00 2001 From: Mike Spertus Date: Sat, 13 Jul 2019 15:27:53 +0000 Subject: [PATCH] Template-related improvements to Visual Studio visualizers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366007 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/ClangVisualizers/clang.natvis | 55 +++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/utils/ClangVisualizers/clang.natvis b/utils/ClangVisualizers/clang.natvis index 42b674e7d7..8b2bf49b41 100644 --- a/utils/ClangVisualizers/clang.natvis +++ b/utils/ClangVisualizers/clang.natvis @@ -196,7 +196,11 @@ For later versions of Visual Studio, no setup is required--> (not yet known if parameter pack) ... - {*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)} + {(TypeSourceInfo *)(DefaultArgument.ValueOrInherited.Val.Value&~3LL),view(cpp)} + {{InheritedInitializer}} + = {this,view(DefaultArg)na} + + {*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)} {this,view(Initializer)na} template{TemplateParams,na} {*TemplatedDecl}; @@ -288,7 +292,7 @@ For later versions of Visual Studio, no setup is required--> - {*Replaced,view(cpp)} <= {CanonicalType,view(cpp)} + {{{*Replaced,view(cpp)} <= {CanonicalType,view(cpp)}}} *(clang::Type *)this, view(cmn) *Replaced @@ -353,7 +357,7 @@ For later versions of Visual Studio, no setup is required--> - {InjectedType,view(cpp)} + {Decl,view(cpp)} Decl InjectedType @@ -424,12 +428,21 @@ For later versions of Visual Studio, no setup is required--> Ty - - {Argument} + + {(QualType *)&Ty,na} - Argument + (QualType *)&Ty + Data + + Not building anything + Building a {LastTy} + + + {Argument,view(cpp)} + {Argument} + {*(clang::QualType *)&TypeOrValue.V,view(cpp)} {(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template argument: {*(clang::QualType *)&TypeOrValue.V} @@ -459,6 +472,21 @@ For later versions of Visual Studio, no setup is required--> + + + {((TemplateArgumentLoc*)Arguments.BeginX)[0],view(cpp)}{*this,view(elt1)} + + , {((TemplateArgumentLoc*)Arguments.BeginX)[1],view(cpp)}{*this,view(elt2)} + + , {((TemplateArgumentLoc*)Arguments.BeginX)[2],view(cpp)}{*this,view(elt3)} + + , {((TemplateArgumentLoc*)Arguments.BeginX)[3],view(cpp)}{*this,view(elt4)} + + , ... + empty + <{*this,view(elt0)}> + Uninitialized + {Arguments[0],view(cpp)}{*this,view(arg1)} @@ -483,6 +511,17 @@ For later versions of Visual Studio, no setup is required--> , {Data[2],view(cpp)}, ... <{*this,view(arg0)}> + + Length + + + + Length + Data + + + + @@ -558,6 +597,7 @@ For later versions of Visual Studio, no setup is required--> TemplateSpecializationTypeBits.NumArgs (clang::TemplateArgument *)(this+1) + *(clang::Type *)this, view(cmn) @@ -745,7 +785,7 @@ For later versions of Visual Studio, no setup is required--> {this,view(retType)nand} {Name,view(cpp)nd}({*this,view(parm0)nd}) (clang::DeclaratorDecl *)this,nd - *this,view(retType)nd + ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType {*this,view(parm0)nd} @@ -755,6 +795,7 @@ For later versions of Visual Studio, no setup is required--> + TemplateOrSpecialization -- 2.40.0