From: Mike Spertus Date: Sun, 20 Mar 2016 20:15:23 +0000 (+0000) Subject: Visual Studio Visualizers for clang::FunctionDecl X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd104f75f15caa9e9d53937cb563e42fcd6dcb41;p=clang Visual Studio Visualizers for clang::FunctionDecl Readably displays a FunctionDecl in the Visual Studio Locals Window something like: void g(int, double d, struct A && arr) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/clang.natvis b/utils/clang.natvis index bd4e09e79e..63f7f7634b 100644 --- a/utils/clang.natvis +++ b/utils/clang.natvis @@ -137,6 +137,7 @@ or create a symbolic link so it updates automatically. + {ResultType,view(cpp)} {*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)} @@ -149,7 +150,7 @@ or create a symbolic link so it updates automatically. , {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)} , /* expand for more params */ - {ResultType,view(cpp)}({*this,view(parm0)}) + {*this,view(retType)}({*this,view(parm0)}) ResultType @@ -234,6 +235,7 @@ or create a symbolic link so it updates automatically. + Empty {*(clang::IdentifierInfo *)(Ptr & ~PtrMask)} {{Identifier ({*(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}} @@ -270,12 +272,50 @@ or create a symbolic link so it updates automatically. (clang::VarDecl::InitializationStyle)InitStyle + + {DeclType,view(cpp)} {Name,view(cpp)} + - {Name} + {*(DeclaratorDecl*)this,nd} *(DeclaratorDecl*)this,nd VarDeclBits + + + + {*(VarDecl*)this,nd} + ParmVarDeclBits + *(VarDecl*)this,nd + + + + {*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType,view(retType)} + + {*ParamInfo[0]}{*this,view(parm1)} + + , {*ParamInfo[1]}{*this,view(parm2)} + + , {*ParamInfo[2]}{*this,view(parm3)} + + , {*ParamInfo[3]}{*this,view(parm4)} + + , {*ParamInfo[4]}{*this,view(parm5)} + + , /* expand for more params */ + {*this,view(retType)} {Name,view(cpp)}({*this,view(parm0)}) + + *this,view(retType) + + {*this,view(parm0)} + + + ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->NumParams + ParamInfo + + + + *(clang::Type *)this, view(cmn)