From 08c699a1105b874cd54cf9a12fa2856bdc708416 Mon Sep 17 00:00:00 2001 From: Mike Spertus Date: Sun, 23 Jun 2019 01:15:48 +0000 Subject: [PATCH] MSVC visualizers for type aliases For example, the following TypeAliasTemplateDecl now displays in the autos window as template using type_identity_t = type_identity::type; llvm-svn: 364145 --- clang/utils/ClangVisualizers/clang.natvis | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/clang/utils/ClangVisualizers/clang.natvis b/clang/utils/ClangVisualizers/clang.natvis index 33d2a3dcfd79..8f17a2a61943 100644 --- a/clang/utils/ClangVisualizers/clang.natvis +++ b/clang/utils/ClangVisualizers/clang.natvis @@ -33,6 +33,8 @@ For later versions of Visual Studio, no setup is required--> {(clang::IncompleteArrayType *)this,na} {(clang::IncompleteArrayType *)this,view(left)na} {(clang::IncompleteArrayType *)this,view(right)na} + {(clang::TypedefType *)this,na} + {(clang::TypedefType *)this,view(cpp)na} {*(clang::AttributedType *)this} {(clang::DecayedType *)this,na} {(clang::DecayedType *)this,view(left)na} @@ -48,6 +50,7 @@ For later versions of Visual Studio, no setup is required--> {*(clang::TemplateSpecializationType *)this} {*(clang::DeducedTemplateSpecializationType *)this} {*(clang::InjectedClassNameType *)this} + {*(clang::DependentNameType *)this} {*(clang::PackExpansionType *)this} {*(clang::LocInfoType *)this} {*this,view(poly)} @@ -93,6 +96,7 @@ For later versions of Visual Studio, no setup is required--> (clang::TemplateSpecializationType *)this (clang::DeducedTemplateSpecializationType *)this (clang::InjectedClassNameType *)this + (clang::DependentNameType *)this (clang::PackExpansionType *)this (clang::LocInfoType *)this @@ -119,6 +123,14 @@ For later versions of Visual Studio, no setup is required--> (clang::ArrayType *)this + + {Decl,view(name)nd} + {Decl} + + Decl + *(clang::Type *)this, view(cmn) + + {PointeeType, view(poly)} * @@ -192,6 +204,24 @@ For later versions of Visual Studio, no setup is required--> TemplatedDecl,na + + + {(clang::TypeSourceInfo *)(MaybeModedTInfo.Value & ~7LL),view(cpp)na} + {(clang::TypedefNameDecl::ModedTInfo *)(MaybeModedTInfo.Value & ~7LL),view(cpp)na} + {(TypeDecl *)this,view(cpp)nand} + typedef {this,view(type)na} {this,view(name)}; + + "Not yet calculated",sb + (bool)(MaybeModedTInfo.Value & 2) + (clang::TypeSourceInfo *)(MaybeModedTInfo.Value & ~7LL) + (clang::TypedefNameDecl::ModedTInfo *)(MaybeModedTInfo.Value & ~7LL) + (TypeDecl *)this,nd + + + + using {(TypedefNameDecl *)this,view(name)nand} = {(TypedefNameDecl *)this,view(type)nand} + + {Storage,na} @@ -303,6 +333,23 @@ For later versions of Visual Studio, no setup is required--> *(clang::Type *)this, view(cmn) + + {NNS}{Name,view(cpp)na} + + NNS + Name + *(clang::Type *)this, view(cmn) + + + + + {(IdentifierInfo*)Specifier,view(cpp)na}:: + {(NamedDecl*)Specifier,view(cpp)na}:: + {(Type*)Specifier,view(cpp)na}:: + + (NestedNameSpecifier::StoredSpecifierKind)((Prefix.Value>>1)&3) + + {Pattern} @@ -343,7 +390,11 @@ For later versions of Visual Studio, no setup is required--> + {Ty,view(cpp)} {Ty} + + Ty + {Argument}