Index: cfe/trunk/utils/ClangVisualizers/clang.natvis =================================================================== --- cfe/trunk/utils/ClangVisualizers/clang.natvis +++ cfe/trunk/utils/ClangVisualizers/clang.natvis @@ -27,18 +27,32 @@ {*(clang::PointerType *)this} {*(clang::LValueReferenceType *)this} {*(clang::RValueReferenceType *)this} + {(clang::ConstantArrayType *)this,na} + {(clang::ConstantArrayType *)this,view(left)na} + {(clang::ConstantArrayType *)this,view(right)na} + {(clang::IncompleteArrayType *)this,na} + {(clang::IncompleteArrayType *)this,view(left)na} + {(clang::IncompleteArrayType *)this,view(right)na} {*(clang::AttributedType *)this} + {(clang::DecayedType *)this,na} + {(clang::DecayedType *)this,view(left)na} + {(clang::DecayedType *)this,view(right)na} {*(clang::TemplateTypeParmType *)this} + {*(clang::TemplateTypeParmType *)this,view(cpp)} {*(clang::SubstTemplateTypeParmType *)this} {*(clang::RecordType *)this} {*(clang::RecordType *)this,view(cpp)} - {*(clang::FunctionProtoType *)this} + {(clang::FunctionProtoType *)this,na} + {(clang::FunctionProtoType *)this,view(left)na} + {(clang::FunctionProtoType *)this,view(right)na} {*(clang::TemplateSpecializationType *)this} {*(clang::DeducedTemplateSpecializationType *)this} {*(clang::InjectedClassNameType *)this} {*(clang::PackExpansionType *)this} {*(clang::LocInfoType *)this} {*this,view(poly)} + {*this,view(cpp)} + No visualizer yet for {(clang::Type::TypeClass)TypeBits.TC,en}Type Dependent{" ",sb} @@ -62,13 +76,16 @@ {*this,view(cmn)} {{{*this,view(poly)}}} (clang::Type::TypeClass)TypeBits.TC - *this,view(flags) + this,view(flags)na CanonicalType *(clang::BuiltinType *)this *(clang::PointerType *)this *(clang::LValueReferenceType *)this *(clang::RValueReferenceType *)this + (clang::ConstantArrayType *)this + (clang::IncompleteArrayType *)this *(clang::AttributedType *)this + (clang::DecayedType *)this (clang::TemplateTypeParmType *)this (clang::SubstTemplateTypeParmType *)this (clang::RecordType *)this @@ -80,6 +97,28 @@ (clang::LocInfoType *)this + + + ElementType + + + + {ElementType,view(cpp)} + [{Size}] + {ElementType,view(cpp)}[{Size}] + + Size + (clang::ArrayType *)this + + + + {ElementType,view(cpp)} + [] + {ElementType,view(cpp)}[] + + (clang::ArrayType *)this + + {PointeeType, view(poly)} * @@ -110,9 +149,9 @@ - {(clang::Decl::Kind)DeclKind,en}Decl + {(clang::Decl::Kind)DeclContextBits.DeclKind,en}Decl - (clang::Decl::Kind)DeclKind,en + (clang::Decl::Kind)DeclContextBits.DeclKind,en @@ -147,10 +186,14 @@ {*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)} - template{TemplateParams,view(deref)} {*TemplatedDecl}; + template{TemplateParams,na} {*TemplatedDecl}; + + TemplateParams,na + TemplatedDecl,na + - {Storage,view(deref)} + {Storage,na} Storage @@ -174,7 +217,7 @@ - {*decl,view(cpp)} + {decl,view(cpp)na} {*decl} *(clang::Type *)this, view(cmn) @@ -182,8 +225,8 @@ - {*(clang::TagType *)this,view(cpp)} - {*(clang::TagType *)this} + {(clang::TagType *)this,view(cpp)na} + {(clang::TagType *)this,na} *(clang::TagType *)this @@ -198,7 +241,8 @@ - {ResultType,view(cpp)} + + {ResultType,view(cpp)} {*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)} @@ -211,7 +255,9 @@ , {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)} , /* expand for more params */ - {*this,view(retType)}({*this,view(parm0)}) + ({*this,view(parm0)}) -> {ResultType,view(cpp)} + ({*this,view(parm0)}) + {this,view(left)na}{this,view(right)na} ResultType @@ -226,8 +272,24 @@ *(clang::Type *)this, view(cmn) + + + {OriginalTy} adjusted to {AdjustedTy} + + OriginalTy + AdjustedTy + + + + {OriginalTy,view(left)} + {OriginalTy,view(right)} + {OriginalTy} + + (clang::AdjustedType *)this + + - {*TTPDecl} + {TTPDecl->Name,view(cpp)} Non-canonical: {*TTPDecl} Canonical: {CanTTPTInfo} @@ -253,6 +315,8 @@ {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType,view(poly)}{*this,view(fastQuals)} {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType,view(cpp)}{*this,view(fastQuals)} + {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType,view(left)}{*this,view(fastQuals)} + {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType,view(right)}{*this,view(fastQuals)} @@ -265,10 +329,10 @@ {" ",sb}const volatile restrict Cannot visualize non-fast qualifiers Null - {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType}{*this,view(fastQuals)} + {((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType,na}{*this,view(fastQuals)} *this,view(fastQuals) - *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType + ((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType @@ -396,19 +460,20 @@ - + {((clang::TemplateArgument *)(this+1))[0],view(cpp)}{*this,view(arg1)} - + , {((clang::TemplateArgument *)(this+1))[1],view(cpp)}{*this,view(arg2)} - + , {((clang::TemplateArgument *)(this+1))[2],view(cpp)}{*this,view(arg3)} - - {*((clang::TemplateDecl *)((Template.Storage.Val.Val.Value >> 2) << 2))->TemplatedDecl,view(cpp)}<{*this,view(arg0)}> + + {*((clang::TemplateDecl *)(Template.Storage.Val.Value))->TemplatedDecl,view(cpp)}<{*this,view(arg0)}> + Can't visualize this TemplateSpecializationType Template.Storage - NumArgs + TemplateSpecializationTypeBits.NumArgs (clang::TemplateArgument *)(this+1) @@ -469,6 +534,7 @@ + {(NamedDecl *)(((CXXDeductionGuideNameExtra *)this)->Template),view(cpp)nand} C++ Deduction guide C++ Literal operator C++ Using directive @@ -498,16 +564,16 @@ - {DeclType,view(cpp)} {Name,view(cpp)} + {DeclType,view(left)} {Name,view(cpp)}{DeclType,view(right)} Name DeclType - {*(DeclaratorDecl*)this,nd} + {(DeclaratorDecl*)this,nand} - *(DeclaratorDecl*)this,nd + (DeclaratorDecl*)this,nd VarDeclBits @@ -518,22 +584,32 @@ *(VarDecl*)this,nd + + {Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nd}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType,view(cpp)} + + (FunctionDecl*)this,nd + + - {*(clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType,view(retType)} + {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType,view(cpp)} - {*ParamInfo[0]}{*this,view(parm1)nd} + {ParamInfo[0],na}{*this,view(parm1)nd} - , {*ParamInfo[1]}{*this,view(parm2)nd} + , {ParamInfo[1],na}{*this,view(parm2)nd} - , {*ParamInfo[2]}{*this,view(parm3)nd} + , {ParamInfo[2],na}{*this,view(parm3)nd} - , {*ParamInfo[3]}{*this,view(parm4)nd} + , {ParamInfo[3],na}{*this,view(parm4)nd} - , {*ParamInfo[4]}{*this,view(parm5)nd} + , {ParamInfo[4],na}{*this,view(parm5)nd} , /* expand for more params */ - {*this,view(retType)nd} {Name,view(cpp)nd}({*this,view(parm0)nd}) + + auto {Name,view(cpp)nd}({*this,view(parm0)nd}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType,view(cpp)} + + {this,view(retType)nand} {Name,view(cpp)nd}({*this,view(parm0)nd}) + (clang::DeclaratorDecl *)this,nd *this,view(retType)nd {*this,view(parm0)nd} @@ -547,9 +623,9 @@ - {($T1 *)Ptr} + {*($T1*)&Ptr} - ($T1 *)Ptr + ($T1*)&Ptr @@ -600,6 +676,47 @@ *(clang::NamedDecl *)(Ptr&~Mask) + + [IK_Identifier] {*Identifier} + [IK_OperatorFunctionId] {OperatorFunctionId} + [IK_ConversionFunctionId] {ConversionFunctionId} + [IK_ConstructorName] {ConstructorName} + [IK_DestructorName] {DestructorName} + [IK_DeductionGuideName] {TemplateName} + [IK_TemplateId] {TemplateId} + [IK_ConstructorTemplateId] {TemplateId} + Kind + + Identifier + OperatorFunctionId + ConversionFunctionId + ConstructorName + DestructorName + TemplateName + TemplateId + TemplateId + + + + NumDecls={NumDecls} + + + NumDecls + (Decl **)(this+1) + + + + + {*D} + {*(DeclGroup *)((uintptr_t)D&~1)} + + D + (DeclGroup *)((uintptr_t)D&~1) + + + + {DS} {Name} + {Decls}