Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
mspertus closed this revision. mspertus added a comment. Committed as revision 262933 http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM. thank you! http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
mspertus updated this revision to Diff 50022. mspertus added a comment. Based on Eric Feiveson's comment that I can suppress the numeric value of an enum visualization with ", en" I have uploaded a new diff. By suppressing the numeric values, instead of the verbose TemplateArgumentLoc visualization (much of which probably won't fit in the window) Type (0x0001), SubstTemplateTypeParm (0x001e): {Identifier (("T"))} => Record (0x0019), {Identifier (("A"))} I get the much more readable Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))} http://reviews.llvm.org/D17908 Files: clang.natvis Index: clang.natvis === --- clang.natvis +++ clang.natvis @@ -1,18 +1,81 @@ http://schemas.microsoft.com/vstudio/debugger/natvis/2010;> -Builtin Type={(clang::BuiltinType::Kind)BuiltinTypeBits.Kind} -Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind} -Type Class={(clang::Type::TypeClass)TypeBits.TC} +{(clang::Type::TypeClass)TypeBits.TC, en} +Builtin Type={*(clang::BuiltinType *)this} +Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind} +{*(clang::SubstTemplateTypeParmType *)this} +{*(clang::RecordType *)this} +{(clang::Type::TypeClass)TypeBits.TC, en} + + (clang::Type::TypeClass)TypeBits.TC + TypeBits + CanonicalType + *(clang::BuiltinType *)this + (clang::SubstTemplateTypeParmType *)this + (clang::RecordType *)this + + + +{*decl} + + decl + + + +{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType *)this} + + *(clang::TagType *)this + + + +{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} = {CanonicalType} + + *(clang::Type *)this, view(BaseOnly) + *Replaced + + + +{*TTPDecl} -{((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 clang::TypeAlignmentInBits) - 1)))-BaseType} + +{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 4) - 1)))-BaseType} + + *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 4) - 1)))-BaseType + + + +{Argument} + + Argument + + + +{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template parameter: {*(clang::QualType *)TypeOrValue.V} + + *(clang::QualType *)TypeOrValue.V + + + + +{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en} + + (clang::BuiltinType::Kind)BuiltinTypeBits.Kind + + + +{Name} + + +{(clang::TemplateDecl *)((Template.Storage.Val.Val.Value 2) 2)} +{Template.Storage} ({((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s}) @@ -35,7 +98,7 @@ -{(clang::tok::TokenKind)Kind} +{(clang::tok::TokenKind)Kind,en} {{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}} @@ -65,4 +128,10 @@ ParmVarDeclBits + +{($T1 *)Ptr + + ($T1 *)Ptr + + ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
mspertus updated this revision to Diff 50015. mspertus added a comment. Updated in response to review comments to fix issues around MSVC versions http://reviews.llvm.org/D17908 Files: clang.natvis Index: clang.natvis === --- clang.natvis +++ clang.natvis @@ -1,18 +1,81 @@ http://schemas.microsoft.com/vstudio/debugger/natvis/2010;> -Builtin Type={(clang::BuiltinType::Kind)BuiltinTypeBits.Kind} -Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind} -Type Class={(clang::Type::TypeClass)TypeBits.TC} +{(clang::Type::TypeClass)TypeBits.TC} +Builtin Type={*(clang::BuiltinType *)this} +Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind} +{*(clang::SubstTemplateTypeParmType *)this} +{*(clang::RecordType *)this} +{(clang::Type::TypeClass)TypeBits.TC} + + (clang::Type::TypeClass)TypeBits.TC + TypeBits + CanonicalType + *(clang::BuiltinType *)this + (clang::SubstTemplateTypeParmType *)this + (clang::RecordType *)this + + + +{*decl} + + decl + + + +{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType *)this} + + *(clang::TagType *)this + + + +{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} = {CanonicalType} + + *(clang::Type *)this, view(BaseOnly) + *Replaced + + + +{*TTPDecl} -{((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 clang::TypeAlignmentInBits) - 1)))-BaseType} + +{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 4) - 1)))-BaseType} + + *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) ~(uintptr_t)((1 4) - 1)))-BaseType + + + +{Argument} + + Argument + + + +{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind}, {*(clang::QualType *)TypeOrValue.V} + + *(clang::QualType *)TypeOrValue.V + + + + +{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind} + + (clang::BuiltinType::Kind)BuiltinTypeBits.Kind + + + +{Name} + + +{(clang::TemplateDecl *)((Template.Storage.Val.Val.Value 2) 2)} +{Template.Storage} ({((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s}) @@ -65,4 +128,10 @@ ParmVarDeclBits + +{($T1 *)Ptr + + ($T1 *)Ptr + + ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
aaron.ballman added a comment. In http://reviews.llvm.org/D17908#369337, @mspertus wrote: > Hmm, testing reveals that the preexisting clang.natvis does not work in > VS2013! > > Natvis: E:\Users\mspertus\Documents\Visual Studio > 2013\Visualizers\clang.natvis(59,21): Error: identifier > "clang::TypeAlignmentInBits" is undefined > > > If I change all clang.natvis occurrences of clang::TypeAlignmentInBits to 4, > it now works in VS2013 and VS2015, including all my edits. While this kind of > hardwiring is brittle, it seems like the best option until we drop VS2013 > support. > > Is it ok for me to make that change? Yeah, I think that change makes sense. We can always rectify it when we drop support for MSVC 2013. Good catch! http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
mspertus added a comment. Hmm, testing reveals that the preexisting clang.natvis does not work in VS2013! Natvis: E:\Users\mspertus\Documents\Visual Studio 2013\Visualizers\clang.natvis(59,21): Error: identifier "clang::TypeAlignmentInBits" is undefined If I change all clang.natvis occurrences of clang::TypeAlignmentInBits to 4, it now works in VS2013 and VS2015, including all my edits. While this kind of hardwiring is brittle, it seems like the best option until we drop VS2013 support. Is it ok for me to make that change? http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
mspertus added a comment. I believe that it will all work on VS2013 (and have kicked off a build to confirm). I guess I would rather drop the number so it doesn't get out of sync whenever the base compiler version changes. http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
aaron.ballman added a comment. In http://reviews.llvm.org/D17908#368972, @zturner wrote: > Natvis has hardly changed at all since it was introduced, so I'm guessing > the lowest common denominator is always going to be our minimum required VS > version Awesome! Sold on removing the date. http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
zturner added a comment. Natvis has hardly changed at all since it was introduced, so I'm guessing the lowest common denominator is always going to be our minimum required VS version http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
Natvis has hardly changed at all since it was introduced, so I'm guessing the lowest common denominator is always going to be our minimum required VS version On Mon, Mar 7, 2016 at 7:09 AM Aaron Ballmanwrote: > aaron.ballman added a comment. > > In http://reviews.llvm.org/D17908#368969, @zturner wrote: > > > Better yet, just delete the number > > > The number is sort of helpful since it's the only documentation as to what > least common denominator we support. I don't have a strong attachment to > the number, however. > > > http://reviews.llvm.org/D17908 > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
aaron.ballman added a comment. In http://reviews.llvm.org/D17908#368969, @zturner wrote: > Better yet, just delete the number The number is sort of helpful since it's the only documentation as to what least common denominator we support. I don't have a strong attachment to the number, however. http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
zturner added a subscriber: zturner. zturner added a comment. Better yet, just delete the number http://reviews.llvm.org/D17908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
Better yet, just delete the number On Mon, Mar 7, 2016 at 6:21 AM Aaron Ballmanwrote: > aaron.ballman added inline comments. > > > Comment at: clang.natvis:1-3 > @@ -1,4 +1,4 @@ > > Do you know if these visualizers will work in MSVC 2013 as well, or are > you using MSVC 2015-specific features? I ask because 2013 is our base MSVC > version currently, so it would be good to know if this will break anyone. > If the features work in 2013, we should probably change it from 2012 to > 2013 in the comment. > > > http://reviews.llvm.org/D17908 > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17908: Add Visual Studio Visualizers for more Clang types
aaron.ballman added inline comments. Comment at: clang.natvis:1-3 @@ -1,4 +1,4 @@