r368029 - Improve MSVC visualizations so the parser shows where we are in the code

2019-08-06 Thread Mike Spertus via cfe-commits
Author: mps
Date: Tue Aug  6 06:29:35 2019
New Revision: 368029

URL: http://llvm.org/viewvc/llvm-project?rev=368029=rev
Log:
Improve MSVC visualizations so the parser shows where we are in the code

Also provide a visualizer for lambda introducers

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=368029=368028=368029=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Tue Aug  6 06:29:35 2019
@@ -763,6 +763,51 @@ For later versions of Visual Studio, no
 {{Identifier 
({(clang::IdentifierInfo *)(PtrData),na})}}
 {(clang::tok::TokenKind)Kind,en}
   
+  
+{BufferPtr,nasb}
+  
+  
+{TheLexer._Mypair._Myval2,na}
+Expanding 
Macro: {TheTokenLexer._Mypair._Myval2,na}
+
+  
+  
+
+  [{(Token *)(CachedTokens.BeginX) + CachedLexPos,na}] 
{IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
+
+ 
{IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
+{CurLexer._Mypair._Myval2,na}
+Expanding 
Macro: {CurTokenLexer._Mypair._Myval2,na}
+
+
+  {this,view(cached)}
+
+CLK_LexAfterModuleImport
+  
+  
+[{Tok}] {PP,na}
+  
+  
+this
+*this
+{Id}
+{Id}
+No visualizer for {Kind}
+  
+  
+
+=,
+,
+
+{(LambdaCapture 
*)(Captures.BeginX),na}{this,view(capture1)na}
+
+,{(LambdaCapture 
*)(Captures.BeginX)+1,na}{this,view(capture2)na}
+
+,{(LambdaCapture 
*)(Captures.BeginX)+2,na}{this,view(capture3)na}
+
+,...
+
[{this,view(default)na}{this,view(capture0)na}]
+  
   
 
   , [{TypeRep}]
@@ -817,6 +862,7 @@ For later versions of Visual Studio, no
 {(DeclaratorDecl*)this,nand}
 
   (DeclaratorDecl*)this,nd
+  Init
   VarDeclBits
 
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r367199 - Improve MSVC visualizers for DeclSpec and TemplateName

2019-07-28 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jul 28 20:34:40 2019
New Revision: 367199

URL: http://llvm.org/viewvc/llvm-project?rev=367199=rev
Log:
Improve MSVC visualizers for DeclSpec and TemplateName

DeclSpec now shows the TypeRep, ExprRep, or DeclRep as appropriate
TemplateName decodes and displays the StorageType
A few minor refinements to other types

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=367199=367198=367199=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jul 28 20:34:40 2019
@@ -49,6 +49,7 @@ For later versions of Visual Studio, no
 {(clang::FunctionProtoType 
*)this,view(right)na}
 {*(clang::TemplateSpecializationType *)this}
 {*(clang::DeducedTemplateSpecializationType 
*)this}
+{*(clang::DeducedTemplateSpecializationType 
*)this,view(cpp)}
 {*(clang::InjectedClassNameType *)this}
 {*(clang::DependentNameType *)this}
 {*(clang::PackExpansionType *)this}
@@ -203,6 +204,7 @@ For later versions of Visual Studio, no
 {*this,view(TorC)} 
{*this,view(MaybeEllipses)}{Name,view(cpp)} 
{this,view(Initializer)na} 
   
   
+{*TemplatedDecl,view(cpp)}
 template{TemplateParams,na} 
{*TemplatedDecl};
 
   TemplateParams,na
@@ -252,7 +254,57 @@ For later versions of Visual Studio, no
   (SubstTemplateTemplateParmPackStorage*)this
 
   
+  
+  
+
+
+  {(clang::TemplateDecl *)(Val.Value  ~3LL),view(cpp)na}
+
+
+  {(clang::TemplateDecl *)(Val.Value  ~3LL),na}
+
+
+  {(clang::UncommonTemplateNameStorage *)(Val.Value  
~3LL),view(cpp)na}
+
+
+  {(clang::UncommonTemplateNameStorage *)(Val.Value  ~3LL),na}
+
+
+  {(clang::QualifiedTemplateName *)(Val.Value  ~3LL),view(cpp)na}
+
+
+  {(clang::QualifiedTemplateName *)(Val.Value  ~3LL),na}
+
+
+  {(clang::DependentTemplateName *)(Val.Value  ~3LL),view(cpp)na}
+
+
+  {(clang::DependentTemplateName *)(Val.Value  ~3LL),na}
+
+
+  "TemplateDecl",s8b
+  
+(clang::TemplateDecl *)(Val.Value  ~3LL)
+  
+  "UncommonTemplateNameStorage",s8b
+  
+(clang::UncommonTemplateNameStorage *)(Val.Value  ~3LL)
+  
+  "QualifiedTemplateName",s8b
+  
+(clang::QualifiedTemplateName *)(Val.Value  ~3LL)
+  
+  "DependentTemplateName",s8b
+  
+(clang::DependentTemplateName *)(Val.Value  ~3LL)
+  
+  Val
+
+
+  
   
+{Storage,view(cpp)na}
 {Storage,na}
 
   Storage
@@ -608,11 +660,12 @@ For later versions of Visual Studio, no
   
   
 {CanonicalType,view(cpp)}
+{Template,view(cpp)}
 {Template}
 
   Template
   CanonicalType,view(cpp)
-  *(clang::DeducedType *)this
+  (clang::DeducedType *)this
   Template
 
   
@@ -711,7 +764,31 @@ For later versions of Visual Studio, no
 {(clang::tok::TokenKind)Kind,en}
   
   
-[{(clang::DeclSpec::SCS)StorageClassSpec}], 
[{(clang::TypeSpecifierType)TypeSpecType}]
+
+  , [{TypeRep}]
+
+
+  , [{ExprRep}]
+
+
+  , [{DeclRep}]
+
+
+[{(clang::DeclSpec::SCS)StorageClassSpec,en}], 
[{(clang::TypeSpecifierType)TypeSpecType,en}]{this,view(extra)na}
+
+  (clang::DeclSpec::SCS)StorageClassSpec
+  (clang::TypeSpecifierType)TypeSpecType
+  
+TypeRep
+  
+  
+ExprRep
+  
+  
+DeclRep
+  
+
+
   
   
 {Name,s}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r366007 - Template-related improvements to Visual Studio visualizers

2019-07-13 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jul 13 08:27:53 2019
New Revision: 366007

URL: http://llvm.org/viewvc/llvm-project?rev=366007=rev
Log:
Template-related improvements to Visual Studio visualizers

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=366007=366006=366007=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jul 13 08:27:53 2019
@@ -196,7 +196,11 @@ For later versions of Visual Studio, no
 (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
 
   
   
-{*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
 
   
   
-{InjectedType,view(cpp)}
+{Decl,view(cpp)}
 
   Decl
   InjectedType
@@ -424,12 +428,21 @@ For later versions of Visual Studio, no
   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
   
 
   
+  
+
+{((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
 
 , {Data[2],view(cpp)}, 
...
 {*this,view(arg0)}
+
+  Length
+  
+
+  
+Length
+Data
+  
+
+  
+
   
   
 
@@ -558,6 +597,7 @@ For later versions of Visual Studio, no
 TemplateSpecializationTypeBits.NumArgs
 (clang::TemplateArgument *)(this+1)
   
+  *(clang::Type *)this, view(cmn)
 
   
   
@@ -745,7 +785,7 @@ For later versions of Visual Studio, no
 {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
   
 
   
+  TemplateOrSpecialization
 
   
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r365248 - Improve MSVC visualization of annot_template_id tokens

2019-07-05 Thread Mike Spertus via cfe-commits
Author: mps
Date: Fri Jul  5 14:41:30 2019
New Revision: 365248

URL: http://llvm.org/viewvc/llvm-project?rev=365248=rev
Log:
Improve MSVC visualization of annot_template_id tokens

Now shows the actual annotated template. E.g.,
{annot_template_id (A)}

Also a few miscellaneous fixes to visualizers of other types

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=365248=365247=365248=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Fri Jul  5 14:41:30 2019
@@ -52,8 +52,9 @@ For later versions of Visual Studio, no
 {*(clang::InjectedClassNameType *)this}
 {*(clang::DependentNameType *)this}
 {*(clang::PackExpansionType *)this}
-{*(clang::LocInfoType *)this}
-{*this,view(poly)}
+{(clang::LocInfoType *)this,na}
+{(clang::LocInfoType *)this,view(cpp)na}
+{this,view(poly)na}
 {*this,view(cpp)}
 
 No visualizer yet for 
{(clang::Type::TypeClass)TypeBits.TC,en}Type 
@@ -222,7 +223,31 @@ For later versions of Visual Studio, no
 {(TypedefNameDecl 
*)this,view(name)nand}
 using {(TypedefNameDecl *)this,view(name)nand} = 
{(TypedefNameDecl *)this,view(type)nand}
   
-
+  
+{Name}
+  
+  
+Kind={(UncommonTemplateNameStorage::Kind)Kind,en}, 
Size={Size}
+
+  (UncommonTemplateNameStorage::Kind)Kind
+  Size
+
+  
+  
+{Bits},
+{this,view(cmn)na},{(OverloadedTemplateStorage*)this,na}
+{this,view(cmn)na},{(AssumedTemplateStorage*)this,na}
+{this,view(cmn)na},{(SubstTemplateTemplateParmStorage*)this,na}
+{this,view(cmn)na},{(SubstTemplateTemplateParmPackStorage*)this,na}
+{this,view(cmn)na}
+
+  Bits
+  (OverloadedTemplateStorage*)this
+  (AssumedTemplateStorage*)this
+  (SubstTemplateTemplateParmStorage*)this
+  (SubstTemplateTemplateParmPackStorage*)this
+
+  
   
 {Storage,na}
 
@@ -290,7 +315,7 @@ For later versions of Visual Studio, no
 ({*this,view(parm0)})
 {this,view(left)na}{this,view(right)na}
 
-  ResultType
+  ResultType
   
 {*this,view(parm0)}
 
@@ -324,10 +349,11 @@ For later versions of Visual Studio, no
 Non-canonical: {*TTPDecl}
 Canonical: {CanTTPTInfo}
 
+  *(clang::Type *)this, view(cmn)
 
   
   
-{*Decl,view(cpp)}
+{InjectedType,view(cpp)}
 
   Decl
   InjectedType
@@ -384,7 +410,8 @@ For later versions of Visual Studio, no
 
   
   
-{*DeclInfo}
+{DeclInfo,view(cpp)na}
+{DeclInfo,na}
 
   DeclInfo
   *(clang::Type *)this, view(cmn)
@@ -420,9 +447,11 @@ For later versions of Visual Studio, no
 , {Args.Args[2],view(cpp)}, 
...
 {*this,view(arg0cpp)}
 {*this,view(arg0)}
+{(clang::Expr 
*)TypeOrValue.V,view(cpp)na}
 
{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 
   *(clang::QualType 
*)TypeOrValue.V
+  (clang::Expr 
*)TypeOrValue.V
   
 Args.NumArgs
 Args.Args
@@ -468,6 +497,7 @@ For later versions of Visual Studio, no
 
   
   
+{(clang::QualType *)Arg,view(cpp)na}
 Type 
template argument: {*(clang::QualType *)Arg}
 Non-type template 
argument: {*(clang::Expr *)Arg}
 Template template 
argument: {*(clang::TemplateName *)Arg
@@ -604,7 +634,7 @@ For later versions of Visual Studio, no
   
   
 {Template->TemplatedDecl,view(cpp)}
-C++ Deduction guide for 
{Template->TemplatedDecl,view(cpp)}
+C++ Deduction guide for 
{Template->TemplatedDecl,view(cpp)na}
   
   
 {Type,view(cpp)}
@@ -613,9 +643,32 @@ For later versions of Visual Studio, no
   
 {Name}
   
+  
+
+{(ParsedTemplateArgument 
*)(this+1),view(cpp)na}{this,view(arg1)na}
+
+, {((ParsedTemplateArgument 
*)(this+1))+1,view(cpp)na}{this,view(arg2)na}
+
+, ...
+{Name,na}{this,view(arg0)na}
+
+  Name
+  
+{this,view(arg0)na}
+
+  
+NumArgs
+(ParsedTemplateArgument *)(this+1)
+  
+
+  
+  Operator
+
+  
   
-{(clang::tok::TokenKind)Kind,en}
-{{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}
+{{annot_template_id 
({(clang::TemplateIdAnnotation *)(PtrData),na})}}
+{{Identifier 
({(clang::IdentifierInfo *)(PtrData),na})}}
+{(clang::tok::TokenKind)Kind,en}
   
   
 [{(clang::DeclSpec::SCS)StorageClassSpec}], 
[{(clang::TypeSpecifierType)TypeSpecType}]


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r364724 - Various tweaks to MSVC natvis visualizers

2019-06-30 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun 30 15:04:25 2019
New Revision: 364724

URL: http://llvm.org/viewvc/llvm-project?rev=364724=rev
Log:
Various tweaks to MSVC natvis visualizers

Make more consistent use of na format.
Improve visualization of deduction guides.
Add visualizer for explicit specifier (including conditionally explicit)
Fix some typos


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=364724=364723=364724=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun 30 15:04:25 2019
@@ -132,7 +132,7 @@ For later versions of Visual Studio, no
 
   
   
-{PointeeType, view(poly)} *
+{PointeeType, view(cpp)} *
 
   PointeeType
   *(clang::Type *)this, view(cmn)
@@ -209,7 +209,7 @@ For later versions of Visual Studio, no
 {(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)};
+typedef {this,view(type)na} 
{this,view(name)na};
 
   "Not yet calculated",sb
   (bool)(MaybeModedTInfo.Value  2)
@@ -219,6 +219,7 @@ For later versions of Visual Studio, no
 
   
   
+{(TypedefNameDecl 
*)this,view(name)nand}
 using {(TypedefNameDecl *)this,view(name)nand} = 
{(TypedefNameDecl *)this,view(type)nand}
   
 
@@ -575,27 +576,43 @@ For later versions of Visual Studio, no
IncludeView="cpp">{*(clang::detail::DeclarationNameExtra 
*)(Ptr  ~PtrMask),view(cpp)}
 {{Extra ({*(clang::detail::DeclarationNameExtra 
*)(Ptr  ~PtrMask)})}}
 
-  *(clang::IdentifierInfo *)(Ptr  ~PtrMask)
-  *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
-  *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
-  *(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask)
-  *(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask)
-  *(clang::detail::CXXSpecialNameExtra *)(Ptr 
 ~PtrMask)
-  *(clang::detail::CXXOperatorIdName *)(Ptr  
~PtrMask)  
-  (clang::detail::DeclarationNameExtra *)(Ptr  
~PtrMask)
+  StoredNameKind(Ptr  PtrMask),en
+  *(clang::IdentifierInfo *)(Ptr  ~PtrMask),na
+  *(clang::IdentifierInfo *)(Ptr  
~PtrMask),na
+  *(clang::IdentifierInfo *)(Ptr  
~PtrMask),na
+  *(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask),na
+  *(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask),na
+  *(clang::detail::CXXSpecialNameExtra *)(Ptr 
 ~PtrMask),na
+  *(clang::detail::CXXOperatorIdName *)(Ptr  
~PtrMask),na  
+  (clang::detail::DeclarationNameExtra *)(Ptr  
~PtrMask),na
 
   
   
-{(NamedDecl *)(((CXXDeductionGuideNameExtra 
*)this)->Template),view(cpp)nand}
-C++ 
Deduction guide
+
+  {(CXXDeductionGuideNameExtra *)this,view(cpp)nand}
+
+
+  {(CXXDeductionGuideNameExtra *)this,nand}
+
 C++ Literal operator
 C++ 
Using directive  
 
{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"
  ",sb}{*this,view(cpp)}
+
+  (CXXDeductionGuideNameExtra *)this
+  ExtraKindOrNumArgs
+
+  
+  
+{Template->TemplatedDecl,view(cpp)}
+C++ Deduction guide for 
{Template->TemplatedDecl,view(cpp)}
   
   
 {Type,view(cpp)}
 {Type}
   
+  
+{Name}
+  
   
 {(clang::tok::TokenKind)Kind,en}
 {{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}
@@ -640,9 +657,18 @@ For later versions of Visual Studio, no
   *(VarDecl*)this,nd
 
   
+  
+{"explicit 
",sb}
+
+explicit({ExplicitSpec,view(ptr)na})
+{ExplicitSpec,view(int)en}
+{ExplicitSpec,view(int)en} : 
{ExplicitSpec,view(ptr)na}
+  
   
-{Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nd}) 
- {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)DeclType.Value.Value)  
~15))-BaseType)->ResultType,view(cpp)}
+
{ExplicitSpec,view(cpp)}{Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nand})
 - {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)DeclType.Value.Value)  
~15))-BaseType)->ResultType,view(cpp)}
 
+  ExplicitSpec
+  (bool)FunctionDeclBits.IsCopyDeductionCandidate
   (FunctionDecl*)this,nd
 
   
@@ -724,7 +750,7 @@ For later versions of Visual Studio, no
 public
 protected
 private
-b
+
 {*(clang::NamedDecl 
*)(Ptr~Mask)}
 {*this,view(access)} {*this,view(decl)}
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r364145 - MSVC visualizers for type aliases

2019-06-22 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jun 22 18:15:48 2019
New Revision: 364145

URL: http://llvm.org/viewvc/llvm-project?rev=364145=rev
Log:
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;

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=364145=364144=364145=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jun 22 18:15:48 2019
@@ -33,6 +33,8 @@ For later versions of Visual Studio, no
 {(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
 {*(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
   (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
   (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
   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
   *(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.Value1)3)
+
+  
   
 {Pattern}
 
@@ -343,7 +390,11 @@ For later versions of Visual Studio, no
 
   
   
+{Ty,view(cpp)}
 {Ty}
+
+  Ty
+
   
   
 {Argument}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r364138 - Natural MSVC visualization of constructors

2019-06-22 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jun 22 11:56:40 2019
New Revision: 364138

URL: http://llvm.org/viewvc/llvm-project?rev=364138=rev
Log:
Natural MSVC visualization of constructors

E.g., Allow MSVC to visualize a CXXConstructorDecl like 
Constructor { Y(type_identity_t)}


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=364138=364137=364138=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jun 22 11:56:40 2019
@@ -515,7 +515,8 @@ For later versions of Visual Studio, no
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  
~PtrMask)})}}
 {{ObjC Zero Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr  ~PtrMask)})}}
 {{ObjC One Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr  ~PtrMask)})}}
-C++ Constructor 
{{*(clang::detail::CXXSpecialNameExtra *)(Ptr  ~PtrMask)}}
+{(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask),view(cpp)na}
+C++ Constructor 
{{{(clang::detail::CXXSpecialNameExtra *)(Ptr  
~PtrMask),view(cpp)na}}}
 C++ Destructor {{*(clang::detail::CXXSpecialNameExtra 
*)(Ptr  ~PtrMask)}}
 C++ Conversion function 
{{*(clang::detail::CXXSpecialNameExtra *)(Ptr  ~PtrMask)}}
 C++ Operator {{*(clang::detail::CXXOperatorIdName *)(Ptr 
 ~PtrMask)}}
@@ -540,6 +541,10 @@ For later versions of Visual Studio, no
 C++ 
Using directive  
 
{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"
  ",sb}{*this,view(cpp)}
   
+  
+{Type,view(cpp)}
+{Type}
+  
   
 {(clang::tok::TokenKind)Kind,en}
 {{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r363574 - Various improvements to Clang MSVC Visualizer

2019-06-17 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Jun 17 09:12:45 2019
New Revision: 363574

URL: http://llvm.org/viewvc/llvm-project?rev=363574=rev
Log:
Various improvements to Clang MSVC Visualizer

This change adds/improves MSVC visualizers for many Clang types, including 
array types, trailing return types in function, deduction guides, a fix for 
OpaquePtr, etc. It also replaces all of the view(deref) with the "na" 
formatter, which is a better built-in natvis technique for doing the same 
thing. 

Differential Revision: https://reviews.llvm.org/D63039


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=363574=363573=363574=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Jun 17 09:12:45 2019
@@ -27,18 +27,32 @@ For later versions of Visual Studio, no
 {*(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 @@ For later versions of Visual Studio, no
 {*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 @@ For later versions of Visual Studio, no
   (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 @@ For later versions of Visual Studio, no
   
   
   
-{(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 @@ For later versions of Visual Studio, no
 {*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 @@ For later versions of Visual Studio, no
 
   
   
-{*decl,view(cpp)}
+{decl,view(cpp)na}
 {*decl}
 
   *(clang::Type *)this, view(cmn)
@@ -182,8 +225,8 @@ For later versions of Visual Studio, no
 
   
   
-{*(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 @@ For later versions of Visual Studio, no
   
   
-{ResultType,view(cpp)}
+
+{ResultType,view(cpp)}
 
 {*(clang::QualType 
*)(this+1),view(cpp)}{*this,view(parm1)}
 
@@ -211,7 +255,9 @@ For later versions of Visual Studio, no
 , 

r350487 - Have MSVC Visualizer for DeducedTemplateSpecializationType show both the original template and deduced specialization

2019-01-05 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jan  5 20:58:48 2019
New Revision: 350487

URL: http://llvm.org/viewvc/llvm-project?rev=350487=rev
Log:
Have MSVC Visualizer for DeducedTemplateSpecializationType show both the 
original template and deduced specialization

Now appears in the Autos window something like

- MyTypeDeducedTemplateSpecializationType  {struct Y}
|- Template template struct Y;
|- Deduced As   struct Y
|- isDeducedtruebool
|- TypeClassDeducedTemplateSpecialization (36)
|- FlagsNo TypeBits set beyond TypeClass
|- CanonicalRecordType  {struct Y}

Also changed QualType visualization to auto-expand the BaseType


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350487=350486=350487=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jan  5 20:58:48 2019
@@ -40,16 +40,16 @@ For later versions of Visual Studio, no
 {*(clang::LocInfoType *)this}
 {*this,view(poly)}
 No visualizer yet for 
{(clang::Type::TypeClass)TypeBits.TC,en}Type 
-Dependent
+Dependent{" ",sb}
 
-InstantiationDependent
+InstantiationDependent{" 
",sb}
 
-VariablyModified
+VariablyModified{" ",sb}
 
-ContainsUnexpandedParameterPack
+ContainsUnexpandedParameterPack{"
 ",sb}
 
 CachedLinkage: 
{(clang::Linkage)TypeBits.CachedLinkage,en} CachedLocalOrUnnamed
-CachedLinkage: 
{(clang::Linkage)TypeBits.CachedLinkage,en}
+CachedLinkage: 
{(clang::Linkage)TypeBits.CachedLinkage,en}{" ",sb}
 
 FromAST
 
@@ -162,13 +162,13 @@ For later versions of Visual Studio, no
   
 implicit{" 
",sb}
 
-{*this,view(implicit)}
+{*this,view(implicit)nd}
 {*this,view(modifiers)}{Name,view(cpp)}
-{*this,view(modifiers)}struct
 {Name,view(cpp)}
-{*this,view(modifiers)}interface
 {Name,view(cpp)}
-{*this,view(modifiers)}union
 {Name,view(cpp)}
-{*this,view(modifiers)}class
 {Name,view(cpp)}
-{*this,view(modifiers)}enum
 {Name,view(cpp)}
+{*this,view(modifiers)nd}struct
 {Name,view(cpp)}
+{*this,view(modifiers)nd}interface
 {Name,view(cpp)}
+{*this,view(modifiers)nd}union
 {Name,view(cpp)}
+{*this,view(modifiers)nd}class
 {Name,view(cpp)}
+{*this,view(modifiers)nd}enum
 {Name,view(cpp)}
 
   (clang::DeclContext *)this
 
@@ -227,6 +227,7 @@ For later versions of Visual Studio, no
 
   
   
+{*TTPDecl}
 Non-canonical: {*TTPDecl}
 Canonical: {CanTTPTInfo}
 
@@ -267,7 +268,7 @@ For later versions of Visual Studio, no
 {*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType}{*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
 
   
   
@@ -419,9 +420,20 @@ For later versions of Visual Studio, no
 
   
   
+{CanonicalType,view(cpp)}
 {Template}
 
+  Template
+  CanonicalType,view(cpp)
   *(clang::DeducedType *)this
+  Template
+
+  
+  
+{*(CXXRecordDecl *)this,nd}{*TemplateArgs}
+
+  (CXXRecordDecl *)this,nd
+  TemplateArgs
 
   
   
@@ -532,7 +544,6 @@ For later versions of Visual Studio, no
   
 
   
-  *(clang::Type *)this, view(cmn)
 
   
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r350482 - Fix MSVC Visualization for TemplateTypeParmType and TemplateTypeParmDecl

2019-01-05 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jan  5 15:15:30 2019
New Revision: 350482

URL: http://llvm.org/viewvc/llvm-project?rev=350482=rev
Log:
Fix MSVC Visualization for TemplateTypeParmType and TemplateTypeParmDecl

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350482=350481=350482=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jan  5 15:15:30 2019
@@ -57,14 +57,13 @@ For later versions of Visual Studio, no
   No TypeBits set beyond TypeClass
 
 
-{*this, view(Dependent)}{*this, view(InstantiationDependent)}{*this, 
view(VariablyModified)}
-{*this, view(ContainsUnexpandedParameterPack)}{*this, view(Cache)}{*this, 
view(FromAST)}
+{*this, view(Dependent)}{*this, view(InstantiationDependent)}{*this, 
view(VariablyModified)}
+{*this, view(ContainsUnexpandedParameterPack)}{*this, view(Cache)}{*this, 
view(FromAST)}
 {*this,view(cmn)}  {{{*this,view(poly)}}}
 
   (clang::Type::TypeClass)TypeBits.TC
   *this,view(flags)
   CanonicalType
-  CanonicalType.Value.Value == this
   *(clang::BuiltinType 
*)this
   *(clang::PointerType 
*)this
   *(clang::LValueReferenceType
 *)this
@@ -142,8 +141,9 @@ For later versions of Visual Studio, no
   
 typename
 class
-...
-
+(not yet known if parameter pack) 
+...
+
 {*this,view(TorC)} 
{*this,view(MaybeEllipses)}{Name,view(cpp)} 
   
   
@@ -227,8 +227,10 @@ For later versions of Visual Studio, no
 
   
   
-{*TTPDecl,view(cpp)}
-{*TTPDecl}
+Non-canonical: {*TTPDecl}
+Canonical: {CanTTPTInfo}
+
+
   
   
 {*Decl,view(cpp)}
@@ -261,6 +263,7 @@ For later versions of Visual Studio, no
 {" ",sb}volatile restrict
 {" ",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)}
 
   *this,view(fastQuals)


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r350470 - Improve MSVC type visualizations

2019-01-05 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jan  5 09:01:34 2019
New Revision: 350470

URL: http://llvm.org/viewvc/llvm-project?rev=350470=rev
Log:
Improve MSVC type visualizations

Display TypeBits in a single line. 
Fix bit rot in template visualizations
Rudimentary support for deduced types


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350470=350469=350470=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jan  5 09:01:34 2019
@@ -34,16 +34,37 @@ For later versions of Visual Studio, no
 {*(clang::RecordType *)this,view(cpp)}
 {*(clang::FunctionProtoType *)this}
 {*(clang::TemplateSpecializationType *)this}
+{*(clang::DeducedTemplateSpecializationType 
*)this}
 {*(clang::InjectedClassNameType *)this}
 {*(clang::PackExpansionType *)this}
 {*(clang::LocInfoType *)this}
 {*this,view(poly)}
 No visualizer yet for 
{(clang::Type::TypeClass)TypeBits.TC,en}Type 
+Dependent
+
+InstantiationDependent
+
+VariablyModified
+
+ContainsUnexpandedParameterPack
+
+CachedLinkage: 
{(clang::Linkage)TypeBits.CachedLinkage,en} CachedLocalOrUnnamed
+CachedLinkage: 
{(clang::Linkage)TypeBits.CachedLinkage,en}
+
+FromAST
+
+
+  No TypeBits set beyond TypeClass
+
+
+{*this, view(Dependent)}{*this, view(InstantiationDependent)}{*this, 
view(VariablyModified)}
+{*this, view(ContainsUnexpandedParameterPack)}{*this, view(Cache)}{*this, 
view(FromAST)}
 {*this,view(cmn)}  {{{*this,view(poly)}}}
 
   (clang::Type::TypeClass)TypeBits.TC
-  TypeBits
+  *this,view(flags)
   CanonicalType
+  CanonicalType.Value.Value == this
   *(clang::BuiltinType 
*)this
   *(clang::PointerType 
*)this
   *(clang::LValueReferenceType
 *)this
@@ -54,6 +75,7 @@ For later versions of Visual Studio, no
   (clang::RecordType 
*)this
   (clang::FunctionProtoType
 *)this
   (clang::TemplateSpecializationType
 *)this
+  (clang::DeducedTemplateSpecializationType
 *)this
   (clang::InjectedClassNameType
 *)this
   (clang::PackExpansionType
 *)this
   (clang::LocInfoType 
*)this
@@ -125,7 +147,13 @@ For later versions of Visual Studio, no
 {*this,view(TorC)} 
{*this,view(MaybeEllipses)}{Name,view(cpp)} 
   
   
-template{*TemplateParams} {*TemplatedDecl};
+template{TemplateParams,view(deref)} 
{*TemplatedDecl};
+  
+  
+{Storage,view(deref)}
+
+  Storage
+
   
   
 {Name,view(cpp)}
@@ -136,11 +164,11 @@ For later versions of Visual Studio, no
 
 {*this,view(implicit)}
 {*this,view(modifiers)}{Name,view(cpp)}
-{*this,view(modifiers)}struct
 {Name,view(cpp)}
-{*this,view(modifiers)}interface
 {Name,view(cpp)}
-{*this,view(modifiers)}union
 {Name,view(cpp)}
-{*this,view(modifiers)}class
 {Name,view(cpp)}
-{*this,view(modifiers)}enum
 {Name,view(cpp)}
+{*this,view(modifiers)}struct
 {Name,view(cpp)}
+{*this,view(modifiers)}interface
 {Name,view(cpp)}
+{*this,view(modifiers)}union
 {Name,view(cpp)}
+{*this,view(modifiers)}class
 {Name,view(cpp)}
+{*this,view(modifiers)}enum
 {Name,view(cpp)}
 
   (clang::DeclContext *)this
 
@@ -381,6 +409,18 @@ For later versions of Visual Studio, no
   
 
   
+  
+
+  (CanonicalType.Value.Value != this) || 
TypeBits.Dependent
+  *(clang::Type *)this,view(cmn)
+
+  
+  
+{Template}
+
+  *(clang::DeducedType *)this
+
+  
   
 {((llvm::StringMapEntryclang::IdentifierInfo 
**)Entry)+1,sb}
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r350371 - Fix MSVC visualizations for ActionResult and OpaquePtr

2019-01-03 Thread Mike Spertus via cfe-commits
Author: mps
Date: Thu Jan  3 15:24:39 2019
New Revision: 350371

URL: http://llvm.org/viewvc/llvm-project?rev=350371=rev
Log:
Fix MSVC visualizations for ActionResult and OpaquePtr

Mainly just fixing buggy code. Also removed unnecessary visualizers
for specializations of OpaquePtr


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350371=350370=350371=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Thu Jan  3 15:24:39 2019
@@ -492,18 +492,6 @@ For later versions of Visual Studio, no
   *(clang::Type *)this, view(cmn)
 
   
-  
-{*(clang::QualType *)this}
-
-  *(clang::QualType *)this
-
-  
-  
-{*(clang::QualType *)this}
-
-  *(clang::QualType *)this
-
-  
   
 {($T1 *)Ptr}
 
@@ -568,30 +556,18 @@ For later versions of Visual Studio, no
 {Ambiguity,en}: {Decls}
 {ResultKind,en}: {Decls}
   
-  
-Invalid
-Valid
-   
-  
+  
 Invalid
-Valid
+Unset
+{Val}
   
-  
-{*this,view(packedValidity)}: {($T1 
*)(PtrWithInvalid~1)}
+  
+Invalid
+Unset
+{($T1)(PtrWithInvalid~1)}
 
   (bool)(PtrWithInvalid1)
-  ($T1 *)(PtrWithInvalid~1)
-
-  
-  
-{*this,view(unpackedValidity)}: {Val}
-  
-  
-{*this,view(packed)}
-{*this,view(unpacked)}
-
-  *this,view(packed)
-  *this,view(unpacked)
+  ($T1)(PtrWithInvalid~1)
 
   
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r350182 - Make clearer which clang::type subclasses have visualizers

2018-12-31 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Dec 31 15:01:34 2018
New Revision: 350182

URL: http://llvm.org/viewvc/llvm-project?rev=350182=rev
Log:
Make clearer which clang::type subclasses have visualizers

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350182=350181=350182=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Dec 31 15:01:34 2018
@@ -38,7 +38,7 @@ For later versions of Visual Studio, no
 {*(clang::PackExpansionType *)this}
 {*(clang::LocInfoType *)this}
 {*this,view(poly)}
-{*this,view(cmn)} 
+No visualizer yet for 
{(clang::Type::TypeClass)TypeBits.TC,en}Type 
 {*this,view(cmn)}  {{{*this,view(poly)}}}
 
   (clang::Type::TypeClass)TypeBits.TC


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r350167 - DeclAccessPair visualizer should be expandable

2018-12-30 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Dec 30 12:22:37 2018
New Revision: 350167

URL: http://llvm.org/viewvc/llvm-project?rev=350167=rev
Log:
DeclAccessPair visualizer should be expandable

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=350167=350166=350167=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Dec 30 12:22:37 2018
@@ -553,6 +553,10 @@ For later versions of Visual Studio, no
 b
 {*(clang::NamedDecl 
*)(Ptr~Mask)}
 {*this,view(access)} {*this,view(decl)}
+
+  (clang::AccessSpecifier)(PtrMask),en
+  *(clang::NamedDecl *)(Ptr~Mask)
+
   
   
 {Decls}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272531 - Improved Visual Studio visualization of OpaquePtr

2016-06-12 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun 12 23:02:35 2016
New Revision: 272531

URL: http://llvm.org/viewvc/llvm-project?rev=272531=rev
Log:
Improved Visual Studio visualization of OpaquePtr

Create a special visualizer for OpaquePtr because the 
standard visualizer doesn't work with OpaquePtr
due to QualType being heavily dependent on traits to be pointer-like.

Also, created an identical visualizer for UnionOpaquePtr

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272531=272530=272531=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun 12 23:02:35 2016
@@ -485,10 +485,28 @@ For later versions of Visual Studio, no
   *(clang::Type *)this, view(cmn)
 
   
+  
+{*(clang::QualType *)this}
+
+  *(clang::QualType *)this
+
+  
+  
+{*(clang::QualType *)this}
+
+  *(clang::QualType *)this
+
+  
   
 {($T1 *)Ptr}
 
   ($T1 *)Ptr
+
+  
+  
+{($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] D21256: Improved Visual Studio 2015 visualization of SmallVectorImpl

2016-06-12 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

revision 272525


http://reviews.llvm.org/D21256



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D21256: Improved Visual Studio 2015 visualization of SmallVectorImpl

2016-06-12 Thread Mike Spertus via cfe-commits
mspertus accepted this revision.
mspertus added a reviewer: mspertus.
mspertus added a comment.
This revision is now accepted and ready to land.

No adverse (or otherwise) comments received, so committing as revision 272525


http://reviews.llvm.org/D21256



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272522 - Visual Studio Visualizer for PackExpansionType

2016-06-12 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun 12 17:54:46 2016
New Revision: 272522

URL: http://llvm.org/viewvc/llvm-project?rev=272522=rev
Log:
Visual Studio Visualizer for PackExpansionType

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272522=272521=272522=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun 12 17:54:46 2016
@@ -35,6 +35,7 @@ For later versions of Visual Studio, no
 {*(clang::FunctionProtoType *)this}
 {*(clang::TemplateSpecializationType *)this}
 {*(clang::InjectedClassNameType *)this}
+{*(clang::PackExpansionType *)this}
 {*(clang::LocInfoType *)this}
 {*this,view(poly)}
 {*this,view(cmn)} 
@@ -54,6 +55,7 @@ For later versions of Visual Studio, no
   (clang::FunctionProtoType
 *)this
   (clang::TemplateSpecializationType
 *)this
   (clang::InjectedClassNameType
 *)this
+  (clang::PackExpansionType
 *)this
   (clang::LocInfoType 
*)this
 
   
@@ -208,6 +210,14 @@ For later versions of Visual Studio, no
   *(clang::Type *)this, view(cmn)
 
   
+  
+{Pattern}
+
+  Pattern
+  NumExpansions
+  *(clang::Type *)this, view(cmn)
+
+  
   
 
 {*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(poly)}{*this,view(fastQuals)}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272521 - Visual Studio native visualizer for ParsedTemplateArgument

2016-06-12 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun 12 17:21:56 2016
New Revision: 272521

URL: http://llvm.org/viewvc/llvm-project?rev=272521=rev
Log:
Visual Studio native visualizer for ParsedTemplateArgument

Does a good job with type and non-type template arguments
and lays the groundwork for template template arguments to
visualize well once there is a TemplateName visualizer.
Also fixed what looks like an incorrect comment in the
header for ParsedTemplate.h.

Modified:
cfe/trunk/include/clang/Sema/ParsedTemplate.h
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/include/clang/Sema/ParsedTemplate.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/ParsedTemplate.h?rev=272521=272520=272521=diff
==
--- cfe/trunk/include/clang/Sema/ParsedTemplate.h (original)
+++ cfe/trunk/include/clang/Sema/ParsedTemplate.h Sun Jun 12 17:21:56 2016
@@ -121,8 +121,8 @@ namespace clang {
 KindType Kind;
 
 /// \brief The actual template argument representation, which may be
-/// an \c ActionBase::TypeTy* (for a type), an Expr* (for an
-/// expression), or an ActionBase::TemplateTy (for a template).
+/// an \c Sema::TypeTy* (for a type), an Expr* (for an
+/// expression), or an Sema::TemplateTy (for a template).
 void *Arg;
 
 /// \brief The nested-name-specifier that can accompany a template template

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272521=272520=272521=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun 12 17:21:56 2016
@@ -309,6 +309,17 @@ For later versions of Visual Studio, no
   TemplateArgumentLists
 
   
+  
+Type 
template argument: {*(clang::QualType *)Arg}
+Non-type template 
argument: {*(clang::Expr *)Arg}
+Template template 
argument: {*(clang::TemplateName *)Arg
+
+  Kind,en
+  (clang::QualType 
*)Arg
+  (clang::Expr 
*)Arg
+  (clang::TemplateName 
*)Arg
+
+  
   
   
 void


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272518 - Rudimentary support for Visual Studio Stmt visualizer

2016-06-12 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun 12 13:42:04 2016
New Revision: 272518

URL: http://llvm.org/viewvc/llvm-project?rev=272518=rev
Log:
Rudimentary support for Visual Studio Stmt visualizer

Better than nothing...

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272518=272517=272518=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun 12 13:42:04 2016
@@ -491,6 +491,12 @@ For later versions of Visual Studio, no
   
 
   
+  
+{(clang::Stmt::StmtClass)StmtBits.sClass,en}
+
+  (clang::Stmt::StmtClass)StmtBits.sClass,en
+
+  
   
 Expression of class 
{(clang::Stmt::StmtClass)StmtBits.sClass,en} and type 
{TR,view(cpp)}
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272487 - Visual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfo

2016-06-11 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sat Jun 11 15:15:19 2016
New Revision: 272487

URL: http://llvm.org/viewvc/llvm-project?rev=272487=rev
Log:
Visual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfo

Created a visualizer for ActionResult that displayed the validity and the 
pointer,
but many of them initially displayed poorly. It turns out that the primary 
culprit
is that LocInfoType is often passed in an action result, but it is not the same 
as other types. For example, LocInfoType is not in TypeNodes.def and 
clang::Type::TypeClass
does not have a LocInfoType enum. After adding a special visualizer for 
LocInfoType,
the display was more useful

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272487=272486=272487=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sat Jun 11 15:15:19 2016
@@ -20,6 +20,7 @@ For later versions of Visual Studio, no
containing all the gory details.
"cpp": Only occasionally used when we need to distinguish between 
an ordinary view and a C++-like view.
 -->
+LocInfoType
 {(clang::Type::TypeClass)TypeBits.TC, 
en}Type
 
 {*(clang::BuiltinType *)this}
@@ -34,6 +35,7 @@ For later versions of Visual Studio, no
 {*(clang::FunctionProtoType *)this}
 {*(clang::TemplateSpecializationType *)this}
 {*(clang::InjectedClassNameType *)this}
+{*(clang::LocInfoType *)this}
 {*this,view(poly)}
 {*this,view(cmn)} 
 {*this,view(cmn)}  {{{*this,view(poly)}}}
@@ -52,6 +54,7 @@ For later versions of Visual Studio, no
   (clang::FunctionProtoType
 *)this
   (clang::TemplateSpecializationType
 *)this
   (clang::InjectedClassNameType
 *)this
+  (clang::LocInfoType 
*)this
 
   
   
@@ -226,6 +229,16 @@ For later versions of Visual Studio, no
   *((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType
 
   
+  
+{*DeclInfo}
+
+  DeclInfo
+  *(clang::Type *)this, view(cmn)
+
+  
+  
+{Ty}
+  
   
 {Argument}
 
@@ -499,4 +512,30 @@ For later versions of Visual Studio, no
 {Ambiguity,en}: {Decls}
 {ResultKind,en}: {Decls}
   
+  
+Invalid
+Valid
+   
+  
+Invalid
+Valid
+  
+  
+{*this,view(packedValidity)}: {($T1 
*)(PtrWithInvalid~1)}
+
+  (bool)(PtrWithInvalid1)
+  ($T1 *)(PtrWithInvalid~1)
+
+  
+  
+{*this,view(unpackedValidity)}: {Val}
+  
+  
+{*this,view(packed)}
+{*this,view(unpacked)}
+
+  *this,view(packed)
+  *this,view(unpacked)
+
+  
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272448 - Visual Studio visualizers associated with LookupResults

2016-06-10 Thread Mike Spertus via cfe-commits
Author: mps
Date: Fri Jun 10 22:02:33 2016
New Revision: 272448

URL: http://llvm.org/viewvc/llvm-project?rev=272448=rev
Log:
Visual Studio visualizers associated with LookupResults

Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example,
when combined with LLVM diff D21256 (currently in review), a Lookup set will
show much more naturally in the Locals window something like

  Found: {public typename ...Ts}


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272448=272447=272448=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Fri Jun 10 22:02:33 2016
@@ -481,4 +481,22 @@ For later versions of Visual Studio, no
   
 Expression of class 
{(clang::Stmt::StmtClass)StmtBits.sClass,en} and type 
{TR,view(cpp)}
   
+  
+public
+protected
+private
+b
+{*(clang::NamedDecl 
*)(Ptr~Mask)}
+{*this,view(access)} {*this,view(decl)}
+  
+  
+{Decls}
+
+  Decls
+
+  
+  
+{Ambiguity,en}: {Decls}
+{ResultKind,en}: {Decls}
+  
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D21256: Improved Visual Studio 2015 visualization of SmallVectorImpl

2016-06-10 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner, aemerson.
mspertus added a subscriber: cfe-commits.

When visualizing small vectors in VS2015, show the first few elements in the 
DisplayString instead of the size. For example, a `SmallVector` of 
`DeclAccessPair` will visualize like

  {public typename ...Ts, public typename U}

The visualization in VS2013 remains the same because we continue to include the 
old visualizer with a lower-than-default priority of `MediumLow`, and the same 
`SmallVector` would continue to be visualized as

  {size = 2}

I decided to submit this one for review before commit because as `SmallVector` 
is used pretty much everywhere in LLVM and Clang, even though I think this is a 
huge improvement in practice but wanted to give others a chance to pipe in if 
they disagree. If no one pipes in, I plan to go ahead and commit in 48 hours

http://reviews.llvm.org/D21256

Files:
  llvm.natvis

Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -8,8 +8,8 @@
 For later versions of Visual Studio, no setup is required.
 -->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
+  
+  
 empty
 {{ 
size={($T1*)EndX - ($T1*)BeginX} }}
 
@@ -21,6 +21,29 @@
   
 
   
+  
+  
+
+{(($T1*)BeginX)[0]}{*this,view(elt1)}
+
+, 
{(($T1*)BeginX)[1]}{*this,view(elt2)}
+
+, 
{(($T1*)BeginX)[2]}{*this,view(elt3)}
+
+, 
{(($T1*)BeginX)[2]}{*this,view(elt4)}
+
+, /* {(($T1*)EndX - ($T1*)BeginX) - 4} 
more*/ 
+empty
+{{{*this,view(elt0)}}}
+
+  ($T1*)EndX - ($T1*)BeginX
+  ($T1*)CapacityX - ($T1*)BeginX
+  
+($T1*)EndX - ($T1*)BeginX
+($T1*)BeginX
+  
+
+  
   
 empty
 {{ size={Length} }}


Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -8,8 +8,8 @@
 For later versions of Visual Studio, no setup is required.
 -->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
+  
+  
 empty
 {{ size={($T1*)EndX - ($T1*)BeginX} }}
 
@@ -21,6 +21,29 @@
   
 
   
+  
+  
+
+{(($T1*)BeginX)[0]}{*this,view(elt1)}
+
+, {(($T1*)BeginX)[1]}{*this,view(elt2)}
+
+, {(($T1*)BeginX)[2]}{*this,view(elt3)}
+
+, {(($T1*)BeginX)[2]}{*this,view(elt4)}
+
+, /* {(($T1*)EndX - ($T1*)BeginX) - 4} more*/ 
+empty
+{{{*this,view(elt0)}}}
+
+  ($T1*)EndX - ($T1*)BeginX
+  ($T1*)CapacityX - ($T1*)BeginX
+  
+($T1*)EndX - ($T1*)BeginX
+($T1*)BeginX
+  
+
+  
   
 empty
 {{ size={Length} }}
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r272441 - Added missing close brace to OpaquePtr Visual Studio visualizer

2016-06-10 Thread Mike Spertus via cfe-commits
Author: mps
Date: Fri Jun 10 17:25:43 2016
New Revision: 272441

URL: http://llvm.org/viewvc/llvm-project?rev=272441=rev
Log:
Added missing close brace to OpaquePtr Visual Studio visualizer

This syntax error resulted in garbage being appended to OpaquePtr visualizations

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=272441=272440=272441=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Fri Jun 10 17:25:43 2016
@@ -452,7 +452,7 @@ For later versions of Visual Studio, no
 
   
   
-{($T1 *)Ptr
+{($T1 *)Ptr}
 
   ($T1 *)Ptr
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r271966 - Improve Visual Studio visualization of DeclaratorDecl

2016-06-06 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Jun  6 19:27:37 2016
New Revision: 271966

URL: http://llvm.org/viewvc/llvm-project?rev=271966=rev
Log:
Improve Visual Studio visualization of DeclaratorDecl

With this change, you can now expand its name and type.

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=271966=271965=271966=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Jun  6 19:27:37 2016
@@ -403,6 +403,10 @@ For later versions of Visual Studio, no
   
   
 {DeclType,view(cpp)} {Name,view(cpp)}
+
+  Name
+  DeclType
+
   
   
 {*(DeclaratorDecl*)this,nd}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r271911 - Fix typo in last submission to visualize proper template argument

2016-06-06 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Jun  6 12:23:37 2016
New Revision: 271911

URL: http://llvm.org/viewvc/llvm-project?rev=271911=rev
Log:
Fix typo in last submission to visualize proper template argument

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=271911=271910=271911=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Jun  6 12:23:37 2016
@@ -265,7 +265,7 @@ For later versions of Visual Studio, no
 
 , 
{Arguments[1],view(cpp)}{*this,view(arg2)}
 
-, {Arguments[1],view(cpp)}, 
...
+, {Arguments[2],view(cpp)}, 
...
 {*this,view(arg0)}
 
   NumArguments


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r271910 - Better Visual Studio visualization of TemplateArgument and TemplateArgumentList

2016-06-06 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Jun  6 12:08:32 2016
New Revision: 271910

URL: http://llvm.org/viewvc/llvm-project?rev=271910=rev
Log:
Better Visual Studio visualization of TemplateArgument and TemplateArgumentList

For pack TemplateArguments, visualize all of the items in the pack
Visualize a TemplateArgumentList as a template argument list. E.g., 

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=271910=271909=271910=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Jun  6 12:08:32 2016
@@ -233,8 +233,22 @@ For later versions of Visual Studio, no
 
   
   
-{*(clang::QualType 
*)TypeOrValue.V,view(cpp)}
-{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 template parameter: {*(clang::QualType *)TypeOrValue.V}
+{*(clang::QualType 
*)TypeOrValue.V,view(cpp)}
+{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 template argument: {*(clang::QualType *)TypeOrValue.V}
+
+{Args.Args[0]}{*this,view(arg1)}
+
+, 
{Args.Args[1]}{*this,view(arg2)}
+
+, {Args.Args[2]}, ...
+
+{Args.Args[0],view(cpp)}{*this,view(arg1cpp)}
+
+, 
{Args.Args[1],view(cpp)}{*this,view(arg2cpp)}
+
+, {Args.Args[2],view(cpp)}, 
...
+{*this,view(arg0cpp)}
+{*this,view(arg0)}
 
{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 
   *(clang::QualType 
*)TypeOrValue.V
@@ -245,6 +259,22 @@ For later versions of Visual Studio, no
   
 
   
+  
+
+{Arguments[0],view(cpp)}{*this,view(arg1)}
+
+, 
{Arguments[1],view(cpp)}{*this,view(arg2)}
+
+, {Arguments[1],view(cpp)}, 
...
+{*this,view(arg0)}
+
+  NumArguments
+  
+NumArguments
+Arguments
+  
+
+  
   
   
 void


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r271866 - Slightly improve Visual Studio visualization of clang::Expr

2016-06-05 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Jun  5 22:37:18 2016
New Revision: 271866

URL: http://llvm.org/viewvc/llvm-project?rev=271866=rev
Log:
Slightly improve Visual Studio visualization of clang::Expr

Now it gives the StmtClass of the Expr as well as the type. It's still
a long way from full visualization of expressions, but I have found
that having the class really helps when debugging, so definitely
worth submitting.

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=271866=271865=271866=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun Jun  5 22:37:18 2016
@@ -424,6 +424,6 @@ For later versions of Visual Studio, no
 
   
   
-Expression of type {TR,view(cpp)}
+Expression of class 
{(clang::Stmt::StmtClass)StmtBits.sClass,en} and type 
{TR,view(cpp)}
   
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r270521 - Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl

2016-05-23 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon May 23 20:47:41 2016
New Revision: 270521

URL: http://llvm.org/viewvc/llvm-project?rev=270521=rev
Log:
Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl

Now a TemplateTypeParm will be visualized as typename ...T if it is a pack

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=270521=270520=270521=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon May 23 20:47:41 2016
@@ -113,8 +113,11 @@ For later versions of Visual Studio, no
 Destructor {{~{Name,view(cpp)}()}}
   
   
-class {Name,view(cpp)}
-typename {Name,view(cpp)}
+typename
+class
+...
+
+{*this,view(TorC)} 
{*this,view(MaybeEllipses)}{Name,view(cpp)} 
   
   
 template{*TemplateParams} {*TemplatedDecl};


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r270505 - Visualizer for Pack template arguments

2016-05-23 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon May 23 17:27:44 2016
New Revision: 270505

URL: http://llvm.org/viewvc/llvm-project?rev=270505=rev
Log:
Visualizer for Pack template arguments


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=270505=270504=270505=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon May 23 17:27:44 2016
@@ -231,9 +231,14 @@ For later versions of Visual Studio, no
   
   
 {*(clang::QualType 
*)TypeOrValue.V,view(cpp)}
-{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} 
template parameter: {*(clang::QualType *)TypeOrValue.V}
+{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 template parameter: {*(clang::QualType *)TypeOrValue.V}
+
{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}
 
   *(clang::QualType 
*)TypeOrValue.V
+  
+Args.NumArgs
+Args.Args
+  
   
 
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r269623 - Simple visualization of expressions

2016-05-15 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun May 15 20:36:09 2016
New Revision: 269623

URL: http://llvm.org/viewvc/llvm-project?rev=269623=rev
Log:
Simple visualization of expressions

While more could be done, showing the type is a lot better than what is there 
now.

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=269623=269622=269623=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Sun May 15 20:36:09 2016
@@ -415,4 +415,7 @@ For later versions of Visual Studio, no
   
 
   
+  
+Expression of type {TR,view(cpp)}
+  
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r265338 - Fix redundant "typename typename T" in Visual Studio Native Visualizer

2016-04-04 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Apr  4 14:36:48 2016
New Revision: 265338

URL: http://llvm.org/viewvc/llvm-project?rev=265338=rev
Log:
Fix redundant "typename typename T" in Visual Studio Native Visualizer

Also, a little minor cleanup

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=265338=265337=265338=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Mon Apr  4 14:36:48 2016
@@ -57,8 +57,8 @@ For later versions of Visual Studio, no
   
 {PointeeType, view(poly)} *
 
-  *(clang::Type *)this, view(cmn)
   PointeeType
+  *(clang::Type *)this, view(cmn)
 
   
   

r265104 - Visual Studio native visualizers for clang::TemplateSpecializationType

2016-03-31 Thread Mike Spertus via cfe-commits
Author: mps
Date: Thu Mar 31 22:31:43 2016
New Revision: 265104

URL: http://llvm.org/viewvc/llvm-project?rev=265104=rev
Log:
Visual Studio native visualizers for clang::TemplateSpecializationType

Displays a template specialization as, say, A. Does not
yet handle UncommonTemplateNameStorage, QualifiedTemplateName, or
DependentTemplateName, but still more than worthwhile

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=265104=265103=265104=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Thu Mar 31 22:31:43 2016
@@ -229,6 +229,7 @@ For later versions of Visual Studio, no
 
   
   
+{*(clang::QualType 
*)TypeOrValue.V,view(cpp)}
 {(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} 
template parameter: {*(clang::QualType *)TypeOrValue.V}
 
   *(clang::QualType 
*)TypeOrValue.V
@@ -269,8 +270,22 @@ For later versions of Visual Studio, no
   
 
   
-{(clang::TemplateDecl 
*)((Template.Storage.Val.Val.Value  2)  2)}
-{Template.Storage}
+
+{((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)}
+
+
+  Template.Storage
+  
+NumArgs
+(clang::TemplateArgument *)(this+1)
+  
+
   
   
 {((llvm::StringMapEntryclang::IdentifierInfo 
**)Entry)+1,sb}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264997 - Visual Studio native visualization for clang::TemplateDecl

2016-03-31 Thread Mike Spertus via cfe-commits
Author: mps
Date: Thu Mar 31 01:09:56 2016
New Revision: 264997

URL: http://llvm.org/viewvc/llvm-project?rev=264997=rev
Log:
Visual Studio native visualization for clang::TemplateDecl

With this change, TemplateDecls display in the Locals Window something like

  template struct A;


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=264997=264996=264997=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Thu Mar 31 01:09:56 2016
@@ -116,6 +116,9 @@ For later versions of Visual Studio, no
 class {Name,view(cpp)}
 typename {Name,view(cpp)}
   
+  
+template{*TemplateParams} {*TemplatedDecl};
+  
   
 {Name,view(cpp)}
 {Name}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264714 - Visual Studio native visualization for TemplateParameterList and TemplateTypeParmDecl

2016-03-29 Thread Mike Spertus via cfe-commits
Author: mps
Date: Tue Mar 29 05:57:24 2016
New Revision: 264714

URL: http://llvm.org/viewvc/llvm-project?rev=264714=rev
Log:
Visual Studio native visualization for TemplateParameterList and 
TemplateTypeParmDecl

With this change, a TemplateParameterList will suggestively display in the 
locals window something like:
  


Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=264714=264713=264714=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Tue Mar 29 05:57:24 2016
@@ -112,6 +112,10 @@ For later versions of Visual Studio, no
   
 Destructor {{~{Name,view(cpp)}()}}
   
+  
+class {Name,view(cpp)}
+typename {Name,view(cpp)}
+  
   
 {Name,view(cpp)}
 {Name}
@@ -371,4 +375,25 @@ For later versions of Visual Studio, no
   ($T1 *)Ptr
 
   
+  
+
+{*((NamedDecl 
**)(this+1))[0],view(cpp)}{*this,view(parm1)}
+
+, {*((NamedDecl 
**)(this+1))[1],view(cpp)}{*this,view(parm2)}
+
+, {*((NamedDecl 
**)(this+1))[2],view(cpp)}{*this,view(parm3)}
+
+, {*((NamedDecl 
**)(this+1))[3],view(cpp)}{*this,view(parm4)}
+
+, {*((NamedDecl 
**)(this+1))[4],view(cpp)}{*this,view(parm5)}
+
+, /* Expand for more params 
*/
+{*this,view(parm0)}
+
+  
+NumParams
+  (NamedDecl **)(this+1)
+  
+
+  
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264710 - Visual Studio native visualizer for InjectedClassNameType

2016-03-29 Thread Mike Spertus via cfe-commits
Author: mps
Date: Tue Mar 29 04:24:45 2016
New Revision: 264710

URL: http://llvm.org/viewvc/llvm-project?rev=264710=rev
Log:
Visual Studio native visualizer for InjectedClassNameType

Also fixes some omissions for TemplateSpecializationType

Modified:
cfe/trunk/utils/ClangVisualizers/clang.natvis

Modified: cfe/trunk/utils/ClangVisualizers/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis?rev=264710=264709=264710=diff
==
--- cfe/trunk/utils/ClangVisualizers/clang.natvis (original)
+++ cfe/trunk/utils/ClangVisualizers/clang.natvis Tue Mar 29 04:24:45 2016
@@ -32,8 +32,10 @@ For later versions of Visual Studio, no
 {*(clang::RecordType *)this}
 {*(clang::RecordType *)this,view(cpp)}
 {*(clang::FunctionProtoType *)this}
+{*(clang::TemplateSpecializationType *)this}
+{*(clang::InjectedClassNameType *)this}
 {*this,view(poly)}
-{*this,view(cmn)}" 
+{*this,view(cmn)} 
 {*this,view(cmn)}  {{{*this,view(poly)}}}
 
   (clang::Type::TypeClass)TypeBits.TC
@@ -48,6 +50,8 @@ For later versions of Visual Studio, no
   (clang::SubstTemplateTypeParmType
 *)this
   (clang::RecordType 
*)this
   (clang::FunctionProtoType
 *)this
+  (clang::TemplateSpecializationType
 *)this
+  (clang::InjectedClassNameType
 *)this
 
   
   
@@ -182,6 +186,14 @@ For later versions of Visual Studio, no
   
 typename {*TTPDecl,view(cpp)}
   
+  
+{*Decl,view(cpp)}
+
+  Decl
+  InjectedType
+  *(clang::Type *)this, view(cmn)
+
+  
   
 
 {*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(poly)}{*this,view(fastQuals)}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264621 - This file was accidentally committed with bad line endings. Fixed...

2016-03-28 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Mar 28 14:08:27 2016
New Revision: 264621

URL: http://llvm.org/viewvc/llvm-project?rev=264621=rev
Log:
This file was accidentally committed with bad line endings. Fixed...

Modified:
cfe/trunk/utils/ClangVisualizers/CMakeLists.txt

Modified: cfe/trunk/utils/ClangVisualizers/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ClangVisualizers/CMakeLists.txt?rev=264621=264620=264621=diff
==
--- cfe/trunk/utils/ClangVisualizers/CMakeLists.txt (original)
+++ cfe/trunk/utils/ClangVisualizers/CMakeLists.txt Mon Mar 28 14:08:27 2016
@@ -1,7 +1,7 @@
-# Do this by hand instead of using add_llvm_utilities(), which
-# tries to create a corresponding executable, which we don't want.
-if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
-  set(CLANG_VISUALIZERS clang.natvis)
-  add_custom_target(ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
-  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
-endif()
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want.
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(CLANG_VISUALIZERS clang.natvis)
+  add_custom_target(ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
+  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
+endif()


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264610 - Convert to Unix line endings due to previous commit error.

2016-03-28 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Mar 28 13:24:22 2016
New Revision: 264610

URL: http://llvm.org/viewvc/llvm-project?rev=264610=rev
Log:
Convert to Unix line endings due to previous commit error.

Modified:
cfe/trunk/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=264610=264609=264610=diff
==
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Mon Mar 28 13:24:22 2016
@@ -1,823 +1,823 @@
-cmake_minimum_required(VERSION 2.8.8)
-
-# FIXME: It may be removed when we use 2.8.12.
-if(CMAKE_VERSION VERSION_LESS 2.8.12)
-  # Invalidate a couple of keywords.
-  set(cmake_2_8_12_INTERFACE)
-  set(cmake_2_8_12_PRIVATE)
-else()
-  # Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries().
-  set(cmake_2_8_12_INTERFACE INTERFACE)
-  set(cmake_2_8_12_PRIVATE PRIVATE)
-  if(POLICY CMP0022)
-cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
-  endif()
-endif()
-
-# If we are not building as a part of LLVM, build Clang as an
-# standalone project, using LLVM as an external library:
-if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
-  project(Clang)
-
-  # Rely on llvm-config.
-  set(CONFIG_OUTPUT)
-  find_program(LLVM_CONFIG "llvm-config")
-  if(LLVM_CONFIG)
-message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
-set(CONFIG_COMMAND ${LLVM_CONFIG}
-  "--assertion-mode"
-  "--bindir"
-  "--libdir"
-  "--includedir"
-  "--prefix"
-  "--src-root")
-execute_process(
-  COMMAND ${CONFIG_COMMAND}
-  RESULT_VARIABLE HAD_ERROR
-  OUTPUT_VARIABLE CONFIG_OUTPUT
-)
-if(NOT HAD_ERROR)
-  string(REGEX REPLACE
-"[ \t]*[\r\n]+[ \t]*" ";"
-CONFIG_OUTPUT ${CONFIG_OUTPUT})
-else()
-  string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
-  message(STATUS "${CONFIG_COMMAND_STR}")
-  message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
-endif()
-  else()
-message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
-  endif()
-
-  list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
-  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
-  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
-  list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
-  list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
-  list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
-
-  if(NOT MSVC_IDE)
-set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
-  CACHE BOOL "Enable assertions")
-# Assertions should follow llvm-config's.
-mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-  endif()
-
-  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
-  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-  set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
-  set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
-  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-
-  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
-NO_DEFAULT_PATH)
-
-  set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
-  set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
-  if(EXISTS ${LLVMCONFIG_FILE})
-list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-include(${LLVMCONFIG_FILE})
-  else()
-message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
-  endif()
-
-  # They are used as destination of target generators.
-  set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-  set(LLVM_LIBRARY_OUTPUT_INTDIR 
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
-  if(WIN32 OR CYGWIN)
-# DLL platform -- put DLLs into bin.
-set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
-  else()
-set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-  endif()
-
-  option(LLVM_INSTALL_TOOLCHAIN_ONLY
-"Only include toolchain files in the 'install' target." OFF)
-
-  option(LLVM_FORCE_USE_OLD_HOST_TOOLCHAIN
-"Set to ON to force using an old, unsupported host toolchain." OFF)
-  option(CLANG_ENABLE_BOOTSTRAP "Generate the clang bootstrap target" OFF)
-
-  include(AddLLVM)
-  include(TableGen)
-  include(HandleLLVMOptions)
-  include(VersionFromVCS)
-
-  set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
-
-  if (NOT DEFINED LLVM_INCLUDE_TESTS)
-set(LLVM_INCLUDE_TESTS ON)
-  endif()
-
-  include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
-  link_directories("${LLVM_LIBRARY_DIR}")
-
-  set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
-  set( CMAKE_LIBRARY_OUTPUT_DIRECTORY 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
-  set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
-
-  if(LLVM_INCLUDE_TESTS)
-set(Python_ADDITIONAL_VERSIONS 2.7)
-include(FindPythonInterp)
-if(NOT PYTHONINTERP_FOUND)
-  message(FATAL_ERROR
-"Unable to find 

Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-28 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Closing diff after commit


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-28 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Commited as revision 264603


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264603 - Use VS2015 Project Support for Natvis to eliminate the need to manually install clang native visualizer

2016-03-28 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Mar 28 13:03:37 2016
New Revision: 264603

URL: http://llvm.org/viewvc/llvm-project?rev=264603=rev
Log:
Use VS2015 Project Support for Natvis to eliminate the need to manually install 
clang native visualizer

This is the clang equivalent to llvm commit 264601. When using Visual Studio 
2015, cmake now puts the native visualizers in llvm.sln, so the developer 
automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual 
installation still needed on VS2013).


Added:
cfe/trunk/utils/ClangVisualizers/
cfe/trunk/utils/ClangVisualizers/CMakeLists.txt
cfe/trunk/utils/ClangVisualizers/clang.natvis
  - copied, changed from r264602, cfe/trunk/utils/clang.natvis
Removed:
cfe/trunk/utils/clang.natvis
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/www/hacking.html

Modified: cfe/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=264603=264602=264603=diff
==
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Mon Mar 28 13:03:37 2016
@@ -1,819 +1,823 @@
-cmake_minimum_required(VERSION 2.8.8)
-
-# FIXME: It may be removed when we use 2.8.12.
-if(CMAKE_VERSION VERSION_LESS 2.8.12)
-  # Invalidate a couple of keywords.
-  set(cmake_2_8_12_INTERFACE)
-  set(cmake_2_8_12_PRIVATE)
-else()
-  # Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries().
-  set(cmake_2_8_12_INTERFACE INTERFACE)
-  set(cmake_2_8_12_PRIVATE PRIVATE)
-  if(POLICY CMP0022)
-cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
-  endif()
-endif()
-
-# If we are not building as a part of LLVM, build Clang as an
-# standalone project, using LLVM as an external library:
-if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
-  project(Clang)
-
-  # Rely on llvm-config.
-  set(CONFIG_OUTPUT)
-  find_program(LLVM_CONFIG "llvm-config")
-  if(LLVM_CONFIG)
-message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
-set(CONFIG_COMMAND ${LLVM_CONFIG}
-  "--assertion-mode"
-  "--bindir"
-  "--libdir"
-  "--includedir"
-  "--prefix"
-  "--src-root")
-execute_process(
-  COMMAND ${CONFIG_COMMAND}
-  RESULT_VARIABLE HAD_ERROR
-  OUTPUT_VARIABLE CONFIG_OUTPUT
-)
-if(NOT HAD_ERROR)
-  string(REGEX REPLACE
-"[ \t]*[\r\n]+[ \t]*" ";"
-CONFIG_OUTPUT ${CONFIG_OUTPUT})
-else()
-  string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
-  message(STATUS "${CONFIG_COMMAND_STR}")
-  message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
-endif()
-  else()
-message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
-  endif()
-
-  list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
-  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
-  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
-  list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
-  list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
-  list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
-
-  if(NOT MSVC_IDE)
-set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
-  CACHE BOOL "Enable assertions")
-# Assertions should follow llvm-config's.
-mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-  endif()
-
-  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
-  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-  set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
-  set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
-  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-
-  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
-NO_DEFAULT_PATH)
-
-  set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
-  set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
-  if(EXISTS ${LLVMCONFIG_FILE})
-list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-include(${LLVMCONFIG_FILE})
-  else()
-message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
-  endif()
-
-  # They are used as destination of target generators.
-  set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-  set(LLVM_LIBRARY_OUTPUT_INTDIR 
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
-  if(WIN32 OR CYGWIN)
-# DLL platform -- put DLLs into bin.
-set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
-  else()
-set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-  endif()
-
-  option(LLVM_INSTALL_TOOLCHAIN_ONLY
-"Only include toolchain files in the 'install' target." OFF)
-
-  option(LLVM_FORCE_USE_OLD_HOST_TOOLCHAIN
-"Set to ON to force using an old, unsupported host toolchain." OFF)
-  option(CLANG_ENABLE_BOOTSTRAP "Generate the clang bootstrap target" OFF)
-
-  include(AddLLVM)
-  include(TableGen)
-  include(HandleLLVMOptions)
-  include(VersionFromVCS)
-
-  set(PACKAGE_VERSION 

Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-28 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Committed as revisions 264601 and 264602


http://reviews.llvm.org/D18497



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-28 Thread Mike Spertus via cfe-commits
mspertus added a comment.

This is still showing as "Needs review" Are there any further changes required 
or can someone accept it? I installed both VS2015 and VS2013 on my laptop and 
saw the correct solution files built by cmake.


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51764.
mspertus added a comment.

Adding missing period in comment!


http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/LLVMVisualizers/CMakeLists.txt
  utils/LLVMVisualizers/llvm.natvis
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,169 +0,0 @@
-
-
-http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
-empty
-{{ size={($T1*)EndX - ($T1*)BeginX} }}
-
-  ($T1*)EndX - ($T1*)BeginX
-  ($T1*)CapacityX - ($T1*)BeginX
-  
-($T1*)EndX - ($T1*)BeginX
-($T1*)BeginX
-  
-
-  
-
-  
-{BeginX,s}
-BeginX,s
-
-  (char*)EndX - (char*)BeginX
-  (char*)CapacityX - (char*)BeginX
-  
-(char*)EndX - (char*)BeginX
-(char*)BeginX
-  
-
-  
-
-  
-{Data,[Length]s}
-Data,[Length]s
-
-  Length
-  
-Length
-Data
-  
-
-  
-
-  
-{IntMask}: {($T1)(Value  PointerBitMask)} [{($T3)((Value  IntShift)  IntMask)}]
-
-  ($T1)(Value  PointerBitMask)
-  ($T3)((Value  IntShift)  IntMask)
-
-  
-
-  
-{"$T1", s8b}: {($T1)(Val.Value  Val.PointerBitMask)}
-{"$T2", s8b}: {($T2)(Val.Value  Val.PointerBitMask)}
-
-  ($T1)(Val.Value  Val.PointerBitMask)
-  ($T2)(Val.Value  Val.PointerBitMask)
-
-  
-
-  
-{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
-{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
-{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
-
-  ($T1)((Val.Val.Value  2)  2)
-  ($T2)((Val.Val.Value  2)  2)
-  ($T3)((Val.Val.Value  2)  2)
-
-  
-
-  
-{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
-{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
-{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
-{"$T4", s8b}: {($T4)((Val.Val.Value  2)  2)}
-
-  ($T1)((Val.Val.Value  2)  2)
-  ($T2)((Val.Val.Value  2)  2)
-  ($T3)((Val.Val.Value  2)  2)
-  ($T4)((Val.Val.Value  2)  2)
-
-  
-
-  
-{{ empty }}
-{{ head={Head} }}
-
-  
-Head
-Next
-this
-  
-
-  
-
-  
-empty
-RefPtr [1 ref] {*Obj}
-RefPtr [{Obj-ref_cnt} refs] {*Obj}
-
-  Obj-ref_cnt
-  Obj
-
-  
-
-  
-{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}
-{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}
-
-  NumElements
-  CurArraySize
-  
-CurArraySize
-($T1*)CurArray
-  
-
-  
-
-  
-empty
-{{ size={NumEntries}, buckets={NumBuckets} }}
-
-  NumEntries
-  NumBuckets
-  
-NumBuckets
-Buckets
-  
-
-  
-
-  
-{{ size={NumItems}, buckets={NumBuckets} }}
-
-  NumItems
-  NumBuckets
-  
-NumBuckets
-(MapEntryTy**)TheTable
-  
-
-  
-
-  
-empty
-({this+1,s}, {second})
-
-  this+1,s
-  second
-
-  
-
-  
-{Data}
-  
-  
-  
-empty
-{*(($T1 *)(unsigned char *)storage.buffer)}
-
-  *(($T1 *)(unsigned char *)storage.buffer)
-
-  
-
Index: utils/LLVMVisualizers/llvm.natvis
===
--- utils/LLVMVisualizers/llvm.natvis
+++ utils/LLVMVisualizers/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: utils/LLVMVisualizers/CMakeLists.txt
===
--- utils/LLVMVisualizers/CMakeLists.txt
+++ utils/LLVMVisualizers/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want.
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -664,6 +670,11 @@
   endif()
 endif()
 
+# Use LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION instead of LLVM_INCLUDE_UTILS because it is not really a util
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  add_subdirectory(utils/LLVMVisualizers)
+endif()
+
 

Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51762.
mspertus added a comment.

Incorporating ariccio's comments and fixing some html


http://reviews.llvm.org/D18498

Files:
  CMakeLists.txt
  utils/ClangVisualizers/CMakeLists.txt
  utils/ClangVisualizers/clang.natvis
  utils/clang.natvis
  www/hacking.html

Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -98,14 +98,16 @@
   
 
   The files 
-http://llvm.org/svn/llvm-project/llvm/trunk/utils/llvm.natvis;>
-  utils/llvm.natvis and 
-http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
-  utils/clang.natvis provide debugger visualizers 
+http://llvm.org/svn/llvm-project/llvm/trunk/utils/LLVMVisualizers/llvm.natvis;>
+  utils/LLVMVisualizers/llvm.natvis and 
+http://llvm.org/svn/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis;>
+  utils/ClangVisualizers/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -1,361 +0,0 @@
-
-
-http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
-
-{(clang::Type::TypeClass)TypeBits.TC, en}Type
-
-{*(clang::BuiltinType *)this}
-{*(clang::PointerType *)this}
-{*(clang::LValueReferenceType *)this}
-{*(clang::RValueReferenceType *)this}
-{*(clang::AttributedType *)this}
-{*(clang::TemplateTypeParmType *)this}
-{*(clang::SubstTemplateTypeParmType *)this}
-{*(clang::RecordType *)this}
-{*(clang::RecordType *)this,view(cpp)}
-{*(clang::FunctionProtoType *)this}
-{*this,view(poly)}
-{*this,view(cmn)}" 
-{*this,view(cmn)}  {{{*this,view(poly)}}}
-
-  (clang::Type::TypeClass)TypeBits.TC
-  TypeBits
-  CanonicalType
-  *(clang::BuiltinType *)this
-  *(clang::PointerType *)this
-  *(clang::LValueReferenceType *)this
-  *(clang::RValueReferenceType *)this
-  *(clang::AttributedType *)this
-  (clang::TemplateTypeParmType *)this
-  (clang::SubstTemplateTypeParmType *)this
-  (clang::RecordType *)this
-  (clang::FunctionProtoType *)this
-
-  
-  
-{PointeeType, view(poly)} *
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-  
-{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
-  
-  
-  
-  
-{(clang::Decl::Kind)DeclKind,en}Decl
-
-  (clang::Decl::Kind)DeclKind,en
-  
-
-
-  
-FirstDecl
-(clang::Decl *)(NextInContextAndBits.Value  ~3)
-*this
-  
-
-  
-
-  
-  
-Field {{{*(clang::DeclaratorDecl *)this,view(cpp)nd}}}
-  
-  
-{*(clang::FunctionDecl *)this,nd}
-Method {{{*this,view(cpp)}}}
-  
-  
-Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}
-  
-  
-Destructor {{~{Name,view(cpp)}()}}
-  
-  
-{Name,view(cpp)}
-{Name}
-  
-  
-implicit{" ",sb}
-
-{*this,view(implicit)}
-{*this,view(modifiers)}{Name,view(cpp)}
-{*this,view(modifiers)}struct {Name,view(cpp)}
-{*this,view(modifiers)}interface {Name,view(cpp)}
-{*this,view(modifiers)}union {Name,view(cpp)}
-{*this,view(modifiers)}class {Name,view(cpp)}
-{*this,view(modifiers)}enum {Name,view(cpp)}
-
-  (clang::DeclContext *)this
-
-  
-  
-{*decl,view(cpp)}
-{*decl}
-
-  *(clang::Type *)this, view(cmn)
-  decl
-
-  
-  
-{*(clang::TagType *)this,view(cpp)}
-{*(clang::TagType *)this}
-
-  *(clang::TagType *)this
-
-  
-  
-{*Replaced,view(cpp)} = {CanonicalType,view(cpp)}
-
-  *(clang::Type *)this, view(cmn)
-  *Replaced
-
-  
-  
-  
-{ResultType,view(cpp)}
-
-{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}
-
-, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}
-
-, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}
-
-, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}
-
-, {*((clang::QualType 

Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus marked an inline comment as done.
mspertus added a comment.

http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus marked an inline comment as done.


Comment at: utils/ClangVisualizers/CMakeLists.txt:2
@@ +1,3 @@
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)

ariccio wrote:
> Obsessive nit: Use a period after the "want", like `want.`
Will do. Note that unfortunately, the CMakeLists.txt files are already 
inconsistent on that score...


Comment at: utils/ClangVisualizers/clang.natvis:9
@@ -8,2 +8,3 @@
+For later versions of Visual Studio, no setup is required-->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 

ariccio wrote:
> Is it just me, or is this a dead link?
It's not a link, it's an XML namespace. The idea is that you use a URL that you 
control as a namespace identifier to avoid collisions.


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

In http://reviews.llvm.org/D18497#384351, @ariccio wrote:

> `utils/llvm.natvis` is a duplicate of `utils/LLVMVisualizers/llvm.natvis`?


The file was moved to a more appropriate directory (Otherwise, the project 
files were stepping on each other).
`svn mv utils/llvm.natvis utils/LLVMVisualizers/llvm.natvis`

> Otherwise, assuming everything builds correctly, LGTM.


There are a lot scenarios. What do all of these files in the build tree like 
`cmake_install.cmake`, `install.vcxproj`, `Package.vcxproj`? How do I test them?

> Once again, thanks for doing this!


You're welcome. Thanks for all your help. I am in India right now with a 
limited environment. I will likely due some more testing when I get home and 
check in at the end of the week.


http://reviews.llvm.org/D18497



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51759.
mspertus added a comment.

Now that we are generating projects for native visualizers, have it properly 
reflected in the directory structure


http://reviews.llvm.org/D18498

Files:
  CMakeLists.txt
  utils/ClangVisualizers/CMakeLists.txt
  utils/ClangVisualizers/clang.natvis
  utils/clang.natvis
  www/hacking.html

Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -103,9 +103,11 @@
 http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
   utils/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -1,361 +0,0 @@
-
-
-http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
-
-{(clang::Type::TypeClass)TypeBits.TC, en}Type
-
-{*(clang::BuiltinType *)this}
-{*(clang::PointerType *)this}
-{*(clang::LValueReferenceType *)this}
-{*(clang::RValueReferenceType *)this}
-{*(clang::AttributedType *)this}
-{*(clang::TemplateTypeParmType *)this}
-{*(clang::SubstTemplateTypeParmType *)this}
-{*(clang::RecordType *)this}
-{*(clang::RecordType *)this,view(cpp)}
-{*(clang::FunctionProtoType *)this}
-{*this,view(poly)}
-{*this,view(cmn)}" 
-{*this,view(cmn)}  {{{*this,view(poly)}}}
-
-  (clang::Type::TypeClass)TypeBits.TC
-  TypeBits
-  CanonicalType
-  *(clang::BuiltinType *)this
-  *(clang::PointerType *)this
-  *(clang::LValueReferenceType *)this
-  *(clang::RValueReferenceType *)this
-  *(clang::AttributedType *)this
-  (clang::TemplateTypeParmType *)this
-  (clang::SubstTemplateTypeParmType *)this
-  (clang::RecordType *)this
-  (clang::FunctionProtoType *)this
-
-  
-  
-{PointeeType, view(poly)} *
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-  
-{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
-
-  *(clang::Type *)this, view(cmn)
-  PointeeType
-
-  
-  
-{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
-  
-  
-  
-  
-{(clang::Decl::Kind)DeclKind,en}Decl
-
-  (clang::Decl::Kind)DeclKind,en
-  
-
-
-  
-FirstDecl
-(clang::Decl *)(NextInContextAndBits.Value  ~3)
-*this
-  
-
-  
-
-  
-  
-Field {{{*(clang::DeclaratorDecl *)this,view(cpp)nd}}}
-  
-  
-{*(clang::FunctionDecl *)this,nd}
-Method {{{*this,view(cpp)}}}
-  
-  
-Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}
-  
-  
-Destructor {{~{Name,view(cpp)}()}}
-  
-  
-{Name,view(cpp)}
-{Name}
-  
-  
-implicit{" ",sb}
-
-{*this,view(implicit)}
-{*this,view(modifiers)}{Name,view(cpp)}
-{*this,view(modifiers)}struct {Name,view(cpp)}
-{*this,view(modifiers)}interface {Name,view(cpp)}
-{*this,view(modifiers)}union {Name,view(cpp)}
-{*this,view(modifiers)}class {Name,view(cpp)}
-{*this,view(modifiers)}enum {Name,view(cpp)}
-
-  (clang::DeclContext *)this
-
-  
-  
-{*decl,view(cpp)}
-{*decl}
-
-  *(clang::Type *)this, view(cmn)
-  decl
-
-  
-  
-{*(clang::TagType *)this,view(cpp)}
-{*(clang::TagType *)this}
-
-  *(clang::TagType *)this
-
-  
-  
-{*Replaced,view(cpp)} = {CanonicalType,view(cpp)}
-
-  *(clang::Type *)this, view(cmn)
-  *Replaced
-
-  
-  
-  
-{ResultType,view(cpp)}
-
-{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}
-
-, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}
-
-, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}
-
-, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}
-
-, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}
-
-, /* expand for more params */
-{*this,view(retType)}({*this,view(parm0)})
-
-  ResultType
-  
-{*this,view(parm0)}
-
-  
-NumParams
-(clang::QualType *)(this+1)
-  
-
-  
-  *(clang::Type *)this, view(cmn)
-

Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51754.
mspertus added a comment.

Since this is now creating a project, we should do some housekeeping to move 
the files to different directories so that the build tree has an 
LLVMVisualizers project directory.


http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/LLVMVisualizers/CMakeLists.txt
  utils/LLVMVisualizers/llvm.natvis
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,169 +0,0 @@
-
-
-http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
-
-  
-empty
-{{ size={($T1*)EndX - ($T1*)BeginX} }}
-
-  ($T1*)EndX - ($T1*)BeginX
-  ($T1*)CapacityX - ($T1*)BeginX
-  
-($T1*)EndX - ($T1*)BeginX
-($T1*)BeginX
-  
-
-  
-
-  
-{BeginX,s}
-BeginX,s
-
-  (char*)EndX - (char*)BeginX
-  (char*)CapacityX - (char*)BeginX
-  
-(char*)EndX - (char*)BeginX
-(char*)BeginX
-  
-
-  
-
-  
-{Data,[Length]s}
-Data,[Length]s
-
-  Length
-  
-Length
-Data
-  
-
-  
-
-  
-{IntMask}: {($T1)(Value  PointerBitMask)} [{($T3)((Value  IntShift)  IntMask)}]
-
-  ($T1)(Value  PointerBitMask)
-  ($T3)((Value  IntShift)  IntMask)
-
-  
-
-  
-{"$T1", s8b}: {($T1)(Val.Value  Val.PointerBitMask)}
-{"$T2", s8b}: {($T2)(Val.Value  Val.PointerBitMask)}
-
-  ($T1)(Val.Value  Val.PointerBitMask)
-  ($T2)(Val.Value  Val.PointerBitMask)
-
-  
-
-  
-{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
-{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
-{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
-
-  ($T1)((Val.Val.Value  2)  2)
-  ($T2)((Val.Val.Value  2)  2)
-  ($T3)((Val.Val.Value  2)  2)
-
-  
-
-  
-{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
-{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
-{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
-{"$T4", s8b}: {($T4)((Val.Val.Value  2)  2)}
-
-  ($T1)((Val.Val.Value  2)  2)
-  ($T2)((Val.Val.Value  2)  2)
-  ($T3)((Val.Val.Value  2)  2)
-  ($T4)((Val.Val.Value  2)  2)
-
-  
-
-  
-{{ empty }}
-{{ head={Head} }}
-
-  
-Head
-Next
-this
-  
-
-  
-
-  
-empty
-RefPtr [1 ref] {*Obj}
-RefPtr [{Obj-ref_cnt} refs] {*Obj}
-
-  Obj-ref_cnt
-  Obj
-
-  
-
-  
-{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}
-{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}
-
-  NumElements
-  CurArraySize
-  
-CurArraySize
-($T1*)CurArray
-  
-
-  
-
-  
-empty
-{{ size={NumEntries}, buckets={NumBuckets} }}
-
-  NumEntries
-  NumBuckets
-  
-NumBuckets
-Buckets
-  
-
-  
-
-  
-{{ size={NumItems}, buckets={NumBuckets} }}
-
-  NumItems
-  NumBuckets
-  
-NumBuckets
-(MapEntryTy**)TheTable
-  
-
-  
-
-  
-empty
-({this+1,s}, {second})
-
-  this+1,s
-  second
-
-  
-
-  
-{Data}
-  
-  
-  
-empty
-{*(($T1 *)(unsigned char *)storage.buffer)}
-
-  *(($T1 *)(unsigned char *)storage.buffer)
-
-  
-
Index: utils/LLVMVisualizers/llvm.natvis
===
--- utils/LLVMVisualizers/llvm.natvis
+++ utils/LLVMVisualizers/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: utils/LLVMVisualizers/CMakeLists.txt
===
--- utils/LLVMVisualizers/CMakeLists.txt
+++ utils/LLVMVisualizers/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
\ No newline at end of file
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -664,6 +670,11 @@
   endif()
 endif()
 
+# Use LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION 

Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

I understand your concerns, but on balance, I don't see a better course of 
action than what I've done. If I have some time, I'll submit a CMake change so 
we can eventually migrate to having CMake generate a Natvis tag, but that will 
take a long time to propagate, so I don't want to delay this operationally 
semantically equivalent change. Sound ok?


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

No. Testing shows that it works fine in the project with the `` tag. 
VS2015 empirically looks at the extension.


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

I'm not sure I understand. I'm not installing anything for VS2013. You still 
have to manually copy into `Documents\VS2013`. The purpose of this change is to 
eliminate this manual step for VS2015 by leveraging the new Natvis project 
support. Am I missing something?


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

What do you mean by "making both paths the same"?


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Hmmm, I just tried adding ` set_source_files_properties(utils/clang.natvis 
LANGUAGE natvis)` similar to what you suggest in 
http://lists.llvm.org/pipermail/llvm-dev/2016-January/093887.html, but it still 
produces the `None` tag in the `.vcxproj` file. Any suggestion what I might be 
doing wrong?

Thanks,
Mike


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus added a comment.

In http://reviews.llvm.org/D18498#384233, @zturner wrote:

> For vs2015, the files still need to be in the project right? (In the
>  vcxproj with a  tag)


This change puts the natvis files in the project for VS2015 but it appears to 
use the `none` tag

  
  http://schemas.microsoft.com/developer/msbuild/2003;>

  


  



  
  
  It does seem to work correctly though... Whaddaya think?


http://reviews.llvm.org/D18498



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51741.
mspertus added a comment.

Apply whitespace comments from http://reviews.llvm.org/D18497 mutatis mutandis 
to this change


http://reviews.llvm.org/D18498

Files:
  CMakeLists.txt
  utils/clang.natvis
  www/hacking.html

Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -103,9 +103,11 @@
 http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
   utils/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better 
visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -2,9 +2,10 @@
 
+For Visual Studio 2013 only, put this file into 
+"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic 
link so it updates automatically.
+
+For later versions of Visual Studio, no setup is required-->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
   
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -817,3 +817,11 @@
 ExternalProject_Add_StepTargets(${NEXT_CLANG_STAGE} ${target})
   endforeach()
 endif()
+
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(CLANG_VISUALIZERS utils/clang.natvis)
+  add_custom_target(ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
+  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
+endif()
\ No newline at end of file


Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -103,9 +103,11 @@
 http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
   utils/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -2,9 +2,10 @@
 
+For Visual Studio 2013 only, put this file into 
+"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic link so it updates automatically.
+
+For later versions of Visual Studio, no setup is required-->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
   
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -817,3 +817,11 @@
 ExternalProject_Add_StepTargets(${NEXT_CLANG_STAGE} ${target})
   endforeach()
 endif()
+
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(CLANG_VISUALIZERS utils/clang.natvis)
+  add_custom_target(ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
+  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
+endif()
\ No newline at end of file
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus marked an inline comment as done.
mspertus added a comment.

http://reviews.llvm.org/D18497



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51740.
mspertus added a comment.

Missed one (the missing period in llvm.natvis).


http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use 
Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual 
Studio 2013, manually copy natvis files to Documents\\Visual Studio 
2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include


Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus marked 3 inline comments as done.
mspertus added a comment.

http://reviews.llvm.org/D18497



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51739.
mspertus added a comment.

Accepting Aaron's suggestions


http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use 
Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual 
Studio 2013, manually copy natvis files to Documents\\Visual Studio 
2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include


Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set(LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target(LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 51735.
mspertus added a comment.

Correctly handle non-Visual Studio case (e.g., Linux)


http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use 
Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual 
Studio 2013, manually copy natvis files to Documents\\Visual Studio 
2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target( LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
@@ -764,6 +778,7 @@
   endif()
 endif()
 
+
 # This must be at the end of the LLVM root CMakeLists file because it must run
 # after all targets are created.
 if(LLVM_DISTRIBUTION_COMPONENTS)


Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,12 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
+  option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+else()
+  set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +734,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target( LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
@@ -764,6 +778,7 @@
   endif()
 endif()
 
+
 # This must be at the end of the LLVM root CMakeLists file because it must run
 # after all targets are created.
 if(LLVM_DISTRIBUTION_COMPONENTS)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18498: Auto-install Clang Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: ariccio, aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.

This change uses the [[ 
https://blogs.msdn.microsoft.com/vcblog/2014/06/12/project-support-for-natvis/ 
| Project Support for Natvis ]] added in VS2015 to eliminate the need to 
manually install natvis files. D18497 is a corresponding diff for LLVM. I want 
to acknowledge ariccio for extensive advice on this change.

http://reviews.llvm.org/D18498

Files:
  CMakeLists.txt
  utils/clang.natvis
  www/hacking.html

Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -103,9 +103,11 @@
 http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
   utils/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better 
visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -2,9 +2,10 @@
 
+For Visual Studio 2013 only, put this file into 
+"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic 
link so it updates automatically.
+
+For later versions of Visual Studio, no setup is required-->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
   
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -817,3 +817,11 @@
 ExternalProject_Add_StepTargets(${NEXT_CLANG_STAGE} ${target})
   endforeach()
 endif()
+
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( CLANG_VISUALIZERS utils/clang.natvis)
+  add_custom_target( ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
+  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
+endif()
\ No newline at end of file


Index: www/hacking.html
===
--- www/hacking.html
+++ www/hacking.html
@@ -103,9 +103,11 @@
 http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang.natvis;>
   utils/clang.natvis provide debugger visualizers 
   that make debugging of more complex data types much easier.
-  Put the files into 
-%USERPROFILE%\Documents\Visual Studio 2012\Visualizers or 
+  For Visual Studio 2013 only, put the files into 
+%USERPROFILE%\Documents\Visual Studio 2013\Visualizers or 
 create a symbolic link so they update automatically.
+  For later versions of Visual Studio, no installation is required.
+Note also that later versions of Visual Studio also display better visualizations.
 
   
   Testing
Index: utils/clang.natvis
===
--- utils/clang.natvis
+++ utils/clang.natvis
@@ -2,9 +2,10 @@
 
+For Visual Studio 2013 only, put this file into 
+"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic link so it updates automatically.
+
+For later versions of Visual Studio, no setup is required-->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
   
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -817,3 +817,11 @@
 ExternalProject_Add_StepTargets(${NEXT_CLANG_STAGE} ${target})
   endforeach()
 endif()
+
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( CLANG_VISUALIZERS utils/clang.natvis)
+  add_custom_target( ClangVisualizers SOURCES ${CLANG_VISUALIZERS})
+  set_target_properties(ClangVisualizers PROPERTIES FOLDER "Utils")
+endif()
\ No newline at end of file
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18497: Auto-install LLVM Visual Studio visualizers for VS2015 and up

2016-03-27 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: ariccio, aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.

This change uses the [[ 
https://blogs.msdn.microsoft.com/vcblog/2014/06/12/project-support-for-natvis/ 
| Project Support for Natvis ]] added in VS2015 to eliminate the need to 
manually install natvis files. I am creating a similar diff for clang. I want 
to acknowledge ariccio for extensive advice on this change.

http://reviews.llvm.org/D18497

Files:
  CMakeLists.txt
  utils/llvm.natvis

Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,14 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if( MSVC_IDE )
+  if (NOT (MSVC_VERSION LESS 1900))
+option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use 
Visual Studio native visualizers" TRUE)
+  else()
+set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For 
Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 
2013\\Visualizers" FORCE)
+  endif()
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +736,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target( LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
@@ -764,6 +780,7 @@
   endif()
 endif()
 
+
 # This must be at the end of the LLVM root CMakeLists file because it must run
 # after all targets are created.
 if(LLVM_DISTRIBUTION_COMPONENTS)


Index: utils/llvm.natvis
===
--- utils/llvm.natvis
+++ utils/llvm.natvis
@@ -1,9 +1,11 @@
 
 
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
 
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -398,6 +398,14 @@
   set(LLVM_USE_HOST_TOOLS ON)
 endif()
 
+if( MSVC_IDE )
+  if (NOT (MSVC_VERSION LESS 1900))
+option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
+  else()
+set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
+  endif()
+endif()
+
 # All options referred to from HandleLLVMOptions have to be specified
 # BEFORE this include, otherwise options will not be correctly set on
 # first cmake run
@@ -728,6 +736,14 @@
 
 add_subdirectory(cmake/modules)
 
+# Do this by hand instead of using add_llvm_utilities(), which
+# tries to create a corresponding executable, which we don't want
+if(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
+  set( LLVM_VISUALIZERS utils/llvm.natvis)
+  add_custom_target( LLVMVisualizers SOURCES ${LLVM_VISUALIZERS})
+  set_target_properties(LLVMVisualizers PROPERTIES FOLDER "Utils")
+endif()
+
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/llvm include/llvm-c
 DESTINATION include
@@ -764,6 +780,7 @@
   endif()
 endif()
 
+
 # This must be at the end of the LLVM root CMakeLists file because it must run
 # after all targets are created.
 if(LLVM_DISTRIBUTION_COMPONENTS)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264229 - Display const/volatile/restrict qualifiers in Visual Studio visualizations

2016-03-23 Thread Mike Spertus via cfe-commits
Author: mps
Date: Wed Mar 23 19:38:54 2016
New Revision: 264229

URL: http://llvm.org/viewvc/llvm-project?rev=264229=rev
Log:
Display const/volatile/restrict qualifiers in Visual Studio visualizations

Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=264229=264228=264229=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Wed Mar 23 19:38:54 2016
@@ -182,11 +182,23 @@ or create a symbolic link so it updates
 typename {*TTPDecl,view(cpp)}
   
   
-
-{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(poly)}
-{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(cpp)}
-{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType}
+
+{*((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)}
+
+
+{" ",sb}const
+{" ",sb}restrict
+{" ",sb}const restrict
+{" ",sb}volatile
+{" ",sb}const volatile
+{" ",sb}volatile restrict
+{" ",sb}const volatile restrict
+Cannot visualize non-fast 
qualifiers
+{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType}{*this,view(fastQuals)}
 
+  *this,view(fastQuals)
   *((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType
 
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264169 - Visualize fields of records as they were declared in Visual Studio debugger

2016-03-23 Thread Mike Spertus via cfe-commits
Author: mps
Date: Wed Mar 23 12:29:42 2016
New Revision: 264169

URL: http://llvm.org/viewvc/llvm-project?rev=264169=rev
Log:
Visualize fields of records as they were declared in Visual Studio debugger

Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=264169=264168=264169=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Wed Mar 23 12:29:42 2016
@@ -95,7 +95,7 @@ or create a symbolic link so it updates
 
   
   
-Field {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+Field {{{*(clang::DeclaratorDecl 
*)this,view(cpp)nd}}}
   
   
 {*(clang::FunctionDecl 
*)this,nd}


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r264020 - Visual Studio Native Visualizations for constructors and methods

2016-03-21 Thread Mike Spertus via cfe-commits
Author: mps
Date: Mon Mar 21 21:29:22 2016
New Revision: 264020

URL: http://llvm.org/viewvc/llvm-project?rev=264020=rev
Log:
Visual Studio Native Visualizations for constructors and methods

With this change, the class

  struct A {
A(int _i);
~A();
int foo(double d);
double bar(A *a) { return 1.3; }
  };

appears in the VS2015 Locals Window as

D  0x02dbb378 struct A
|- DeclKindCXXRecord
|- Members
 |- [0]implicit struct A
 |- [1]Constructor {A(int _i)}
 |- [2]Destructor {~A()}
 |- [3]Method {int foo(double d)}
 |- [4]Method {double bar(struct A *)}
|- [Raw View]  /* Other stuff */

Note that these changes only benefit VS2015 as
VS2013 does not have views and only displays the
struct name "A", but the change does no apparent
harm in VS2013, so is still a win.

Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=264020=264019=264020=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Mon Mar 21 21:29:22 2016
@@ -29,6 +29,7 @@ or create a symbolic link so it updates
 {*(clang::TemplateTypeParmType *)this}
 {*(clang::SubstTemplateTypeParmType *)this}
 {*(clang::RecordType *)this}
+{*(clang::RecordType *)this,view(cpp)}
 {*(clang::FunctionProtoType *)this}
 {*this,view(poly)}
 {*this,view(cmn)}" 
@@ -81,40 +82,51 @@ or create a symbolic link so it updates
 {(clang::Decl::Kind)DeclKind,en}Decl
 
   (clang::Decl::Kind)DeclKind,en
-  
-FirstDecl
-(clang::Decl *)(NextInContextAndBits.Value  
~3)
-*this
-  
+  
+
+
+  
+FirstDecl
+(clang::Decl *)(NextInContextAndBits.Value  
~3)
+*this
+  
+
+  
 
   
   
 Field {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
   
   
-Method {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+{*(clang::FunctionDecl 
*)this,nd}
+Method {{{*this,view(cpp)}}}
   
   
-Constructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl 
*)this,view(parm0)nd})}}
   
   
-Destructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+Destructor {{~{Name,view(cpp)}()}}
   
   
 {Name,view(cpp)}
 {Name}
   
   
-struct 
{Name,view(cpp)}
-interface 
{Name,view(cpp)}
-union 
{Name,view(cpp)}
-class 
{Name,view(cpp)}
-enum 
{Name,view(cpp)}
+implicit{" 
",sb}
+
+{*this,view(implicit)}
+{*this,view(modifiers)}{Name,view(cpp)}
+{*this,view(modifiers)}struct
 {Name,view(cpp)}
+{*this,view(modifiers)}interface
 {Name,view(cpp)}
+{*this,view(modifiers)}union
 {Name,view(cpp)}
+{*this,view(modifiers)}class
 {Name,view(cpp)}
+{*this,view(modifiers)}enum
 {Name,view(cpp)}
 
   (clang::DeclContext *)this
 
   
   
+{*decl,view(cpp)}
 {*decl}
 
   *(clang::Type *)this, view(cmn)
@@ -122,6 +134,7 @@ or create a symbolic link so it updates
 
   
   
+{*(clang::TagType 
*)this,view(cpp)}
 {*(clang::TagType *)this}
 
   *(clang::TagType *)this
@@ -241,14 +254,23 @@ or create a symbolic link so it updates
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  
~PtrMask)})}}
 {{ObjC Zero Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr  ~PtrMask)})}}
 {{ObjC One Arg Selector (*{(clang::IdentifierInfo 
*)(Ptr  ~PtrMask)})}}
-{{Extra 
({(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr 
 ~PtrMask))-ExtraKindOrNumArgs})}}
+{*(clang::DeclarationNameExtra *)(Ptr 
 ~PtrMask),view(cpp)}
+{{Extra ({*(clang::DeclarationNameExtra *)(Ptr 
 ~PtrMask)})}}
 
   *(clang::IdentifierInfo *)(Ptr  ~PtrMask)
   *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
   *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
-  (clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra
 *)(Ptr  ~PtrMask))-ExtraKindOrNumArgs
+  (clang::DeclarationNameExtra *)(Ptr  ~PtrMask)
 
   
+  
+{((clang::CXXSpecialName 
*)this)-Type,view(cpp)}
+
{(clang::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{"
  ",sb}{*this,view(cpp)}
+  
   
 {(clang::tok::TokenKind)Kind,en}
 {{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}
@@ -292,22 +314,22 @@ or create a symbolic link so it updates
   
 {*(clang::FunctionProtoType 
*)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value)  
~15))-BaseType,view(retType)}
 
-{*ParamInfo[0]}{*this,view(parm1)}
+{*ParamInfo[0]}{*this,view(parm1)nd}
 
-, 
{*ParamInfo[1]}{*this,view(parm2)}
+, 
{*ParamInfo[1]}{*this,view(parm2)nd}
 
-, 
{*ParamInfo[2]}{*this,view(parm3)}
+, 
{*ParamInfo[2]}{*this,view(parm3)nd}
 
-, 
{*ParamInfo[3]}{*this,view(parm4)}
+, 

Re: [PATCH] D18303: Visual Studio Visualizers for clang::FunctionDecl

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Closing accepted revision


http://reviews.llvm.org/D18303



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18303: Visual Studio Visualizers for clang::FunctionDecl

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Committed as revision 263915.


http://reviews.llvm.org/D18303



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r263915 - Visual Studio Visualizers for clang::FunctionDecl

2016-03-20 Thread Mike Spertus via cfe-commits
Author: mps
Date: Sun Mar 20 15:15:23 2016
New Revision: 263915

URL: http://llvm.org/viewvc/llvm-project?rev=263915=rev
Log:
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)



Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=263915=263914=263915=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Sun Mar 20 15:15:23 2016
@@ -137,6 +137,7 @@ or create a symbolic link so it updates
   
   
+{ResultType,view(cpp)}
 
 {*(clang::QualType 
*)(this+1),view(cpp)}{*this,view(parm1)}
 
@@ -149,7 +150,7 @@ or create a symbolic link so it updates
 , {*((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
 
   
   
+
 Empty
 {*(clang::IdentifierInfo *)(Ptr  
~PtrMask)}
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  
~PtrMask)})}}
@@ -270,12 +272,50 @@ or create a symbolic link so it updates
   (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)
 
   
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18299: Better visualization of clang::BuiltinType in VisualStudio

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Closing committed revision


http://reviews.llvm.org/D18299



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18299: Better visualization of clang::BuiltinType in VisualStudio

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus accepted this revision.
mspertus added a reviewer: mspertus.
mspertus added a comment.
This revision is now accepted and ready to land.

Per Aaron, I want to close the committed diff, but I seem to need to accept it 
first. Further discussion as needed on mailing list


http://reviews.llvm.org/D18299



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18297: Visualizer for clang::FunctionProtoType

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Closing committed revision. Further discussion as needed on mailing list


http://reviews.llvm.org/D18297



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18297: Visualizer for clang::FunctionProtoType

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus accepted this revision.
mspertus added a reviewer: mspertus.
mspertus added a comment.
This revision is now accepted and ready to land.

Accepting revision based on Aaron's LGTM email to reviews.llvm.org.


http://reviews.llvm.org/D18297



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18303: Visual Studio Visualizers for clang::FunctionDecl

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.

Displays a FunctionDecl in the Visual Studio Locals Window something like:

  void g(int, double d, struct A && arr)

http://reviews.llvm.org/D18303

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -137,6 +137,7 @@
   
   
+{ResultType,view(cpp)}
 
 {*(clang::QualType 
*)(this+1),view(cpp)}{*this,view(parm1)}
 
@@ -149,7 +150,7 @@
 , {*((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 @@
 
   
   
+
 Empty
 {*(clang::IdentifierInfo *)(Ptr  
~PtrMask)}
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  
~PtrMask)})}}
@@ -270,12 +272,50 @@
   (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)
 
   
   


Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -137,6 +137,7 @@
   
   
+{ResultType,view(cpp)}
 
 {*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}
 
@@ -149,7 +150,7 @@
 , {*((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 @@
 
   
   
+
 Empty
 {*(clang::IdentifierInfo *)(Ptr  ~PtrMask)}
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
@@ -270,12 +272,50 @@
   (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)
 
   
   
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18163: Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Committed as revision 263638. At Chandler's suggestion, I am going to send an 
announcement to cfe-dev letting people know of all of the recent improvements 
to native visualizers


http://reviews.llvm.org/D18163



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r263638 - Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-20 Thread Mike Spertus via cfe-commits
Author: mps
Date: Wed Mar 16 09:27:50 2016
New Revision: 263638

URL: http://llvm.org/viewvc/llvm-project?rev=263638=rev
Log:
Add visualizers for more clang types. Create more C++-like visualizations for 
existing Clang types

Created visualizer for PointerType, LValueReferenceType, RValueReferenceType, 
and TemplateParmType.
In addition, cleaned up the display of existing types to be more C++-like. For 
example, instead of

  SubstTemplateTypeParmType: {Identifier (("T"))} => Record (25), {Identifier 
(("A"))}

it now displays more readably as 

  SubstTemplateTypeParmType: {typename T <= struct A}

The  sections still can be used for all the gory details if necessary.


Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=263638=263637=263638=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Wed Mar 16 09:27:50 2016
@@ -6,46 +6,112 @@ Put this file into "%USERPROFILE%\Docume
 or create a symbolic link so it updates automatically.
 -->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
+
   
-{(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
+
+{(clang::Type::TypeClass)TypeBits.TC, 
en}Type
+
+{*(clang::BuiltinType *)this}
+{*(clang::PointerType *)this}
+{*(clang::LValueReferenceType *)this}
+{*(clang::RValueReferenceType *)this}
+{*(clang::AttributedType *)this}
+{*(clang::TemplateTypeParmType *)this}
+{*(clang::SubstTemplateTypeParmType *)this}
+{*(clang::RecordType *)this}
+{*this,view(poly)}
+{*this,view(cmn)}" 
+{*this,view(cmn)}  {{{*this,view(poly)}}}
+
+  (clang::Type::TypeClass)TypeBits.TC
+  TypeBits
+  CanonicalType
+  *(clang::BuiltinType 
*)this
+  *(clang::PointerType 
*)this
+  *(clang::LValueReferenceType
 *)this
+  *(clang::RValueReferenceType
 *)this
+  *(clang::AttributedType
 *)this
+  (clang::TemplateTypeParmType
 *)this
+  (clang::SubstTemplateTypeParmType
 *)this
+  (clang::RecordType 
*)this
+
+  
+  
+{PointeeType, view(poly)} *
+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
+
+  
+  
+  
+{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 

+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
+
+  
+  
+{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 

+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
 
   
+  
+{ModifiedType} 
Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
+  
+  
+{Name,view(cpp)}
+{Name}
+  
+  
+struct 
{Name,view(cpp)}
+interface 
{Name,view(cpp)}
+union 
{Name,view(cpp)}
+class 
{Name,view(cpp)}
+enum 
{Name,view(cpp)}
+  
   
 {*decl}
 
+  *(clang::Type *)this, view(cmn)
   decl
 
   
   
-{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType 
*)this}
+{*(clang::TagType *)this}
 
   *(clang::TagType *)this
 
   
+
   
-{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} = 
{CanonicalType}
+{*Replaced,view(cpp)} = 
{CanonicalType,view(cpp)}
 
-  *(clang::Type *)this, view(BaseOnly)
+  *(clang::Type *)this, view(cmn)
   *Replaced
 
   
   
-{*TTPDecl}
+typename {*TTPDecl,view(cpp)}
   
   
 
+{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(poly)}
+{*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType,view(cpp)}
 {*((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType}
 
   *((clang::ExtQualsTypeCommonBase 
*)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 
1)))-BaseType
@@ -70,15 +136,13 @@ or create a symbolic link so it updates
   (clang::BuiltinType::Kind)BuiltinTypeBits.Kind
 
   
-  
-{Name}
-  
+
   
 {(clang::TemplateDecl 
*)((Template.Storage.Val.Val.Value  2)  2)}
 {Template.Storage}
   
   
-({((llvm::StringMapEntryclang::IdentifierInfo 
**)Entry)+1,s})
+{((llvm::StringMapEntryclang::IdentifierInfo 
**)Entry)+1,sb}
 
   ((llvm::StringMapEntryclang::IdentifierInfo 
**)Entry)+1,s
   (clang::tok::TokenKind)TokenID
@@ -86,6 +150,7 @@ or create a symbolic link so it updates
   
   
 Empty
+

Re: [PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-20 Thread Mike Spertus via cfe-commits
mspertus added a comment.

I think the code is correct as written, see response in comment



Comment at: clang.natvis:77
@@ +76,3 @@
+  
+  
+  

aaron.ballman wrote:
> The only hard-wiring I see uses 3 bits, so is this comment still accurate?
I think the code is correct. 
```
  llvm::PointerIntPair NextInContextAndBits;

```
so `NextInContextAndBits` uses 2 bits for the `int` part. Just to be sure, I 
also double checked in the debugger (an `IntMask` of 3 represents two bits :) ),

```
clang::DeclContext *)(clang::CXXRecordDecl 
*)D)->FirstDecl)->NextInContextAndBits).IntMask  IntMask (3) 
llvm::PointerIntPair >::

```


http://reviews.llvm.org/D18261



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18163: Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 50820.
mspertus added a comment.

Added reference types and a more accurate AttributedType enum. I am working on 
additional items for the future (class members, function types, etc.) but those 
will take longer, and I think it is worthwhile to get this revision committed 
unless there are defects in it. Agree?


http://reviews.llvm.org/D18163

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -6,46 +6,112 @@
 or create a symbolic link so it updates automatically.
 -->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
+
   
-{(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
+
+{(clang::Type::TypeClass)TypeBits.TC, en}Type
+
+{*(clang::BuiltinType *)this}
+{*(clang::PointerType *)this}
+{*(clang::LValueReferenceType *)this}
+{*(clang::RValueReferenceType *)this}
+{*(clang::AttributedType *)this}
+{*(clang::TemplateTypeParmType *)this}
+{*(clang::SubstTemplateTypeParmType *)this}
+{*(clang::RecordType *)this}
+{*this,view(poly)}
+{*this,view(cmn)}" 
+{*this,view(cmn)}  {{{*this,view(poly)}}}
+
+  (clang::Type::TypeClass)TypeBits.TC
+  TypeBits
+  CanonicalType
+  *(clang::BuiltinType *)this
+  *(clang::PointerType *)this
+  *(clang::LValueReferenceType *)this
+  *(clang::RValueReferenceType *)this
+  *(clang::AttributedType *)this
+  (clang::TemplateTypeParmType *)this
+  (clang::SubstTemplateTypeParmType *)this
+  (clang::RecordType *)this
+
+  
+  
+{PointeeType, view(poly)} *
+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
+
+  
+  
+  
+{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
+
+  
+  
+{((clang::ReferenceType *)this)-PointeeType,view(cpp)} 
+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
 
   
+  
+{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
+  
+  
+{Name,view(cpp)}
+{Name}
+  
+  
+struct {Name,view(cpp)}
+interface {Name,view(cpp)}
+union {Name,view(cpp)}
+class {Name,view(cpp)}
+enum {Name,view(cpp)}
+  
   
 {*decl}
 
+  *(clang::Type *)this, view(cmn)
   decl
 
   
   
-{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType *)this}
+{*(clang::TagType *)this}
 
   *(clang::TagType *)this
 
   
+
   
-{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} = {CanonicalType}
+{*Replaced,view(cpp)} = {CanonicalType,view(cpp)}
 
-  *(clang::Type *)this, view(BaseOnly)
+  *(clang::Type *)this, view(cmn)
   *Replaced
 
   
   
-{*TTPDecl}
+typename {*TTPDecl,view(cpp)}
   
   
 
+{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType,view(poly)}
+{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType,view(cpp)}
 {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType}
 
   *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType
@@ -70,22 +136,21 @@
   (clang::BuiltinType::Kind)BuiltinTypeBits.Kind
 
   
-  
-{Name}
-  
+
   
 {(clang::TemplateDecl *)((Template.Storage.Val.Val.Value  2)  2)}
 {Template.Storage}
   
   
-({((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s})
+{((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,sb}
 
   ((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s
   (clang::tok::TokenKind)TokenID
 
   
   
 Empty
+{*(clang::IdentifierInfo *)(Ptr  ~PtrMask)}
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
 {{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
 {{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.

This change shows members of `DeclContext` objects in the Visual Studio 
debugger. It will also cast a `TagType` like a class or a struct to a 
`DeclContext`, so its methods and fields are visualized. For example, suppose 
we have a class

```
struct A {
  int foo();
};
```

With this change, the `CXXRecordDecl *` representing `A` will be displayed in 
the Visual Studio debugger as

```
D 0x0067ab48 struct A
|- DeclKind   CXXRecord
|- [0]struct A
|- [1]Method {foo}
|- [Raw View] //Remaining fields//
```

http://reviews.llvm.org/D18261

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -73,6 +73,31 @@
   
 {ModifiedType} 
Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
   
+  
+  
+  
+{(clang::Decl::Kind)DeclKind,en}Decl
+
+  (clang::Decl::Kind)DeclKind,en
+  
+FirstDecl
+(clang::Decl *)(NextInContextAndBits.Value  
~3)
+*this
+  
+
+  
+  
+Field {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Method {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Constructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Destructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
   
 {Name,view(cpp)}
 {Name}
@@ -83,6 +108,9 @@
 union 
{Name,view(cpp)}
 class 
{Name,view(cpp)}
 enum 
{Name,view(cpp)}
+
+  (clang::DeclContext *)this
+
   
   
 {*decl}
@@ -97,7 +125,6 @@
   *(clang::TagType *)this
 
   
-
   
 {*Replaced,view(cpp)} = 
{CanonicalType,view(cpp)}
 


Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -73,6 +73,31 @@
   
 {ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
   
+  
+  
+  
+{(clang::Decl::Kind)DeclKind,en}Decl
+
+  (clang::Decl::Kind)DeclKind,en
+  
+FirstDecl
+(clang::Decl *)(NextInContextAndBits.Value  ~3)
+*this
+  
+
+  
+  
+Field {{{*(clang::NamedDecl *)this,view(cpp)nd}}}
+  
+  
+Method {{{*(clang::NamedDecl *)this,view(cpp)nd}}}
+  
+  
+Constructor {{{*(clang::NamedDecl *)this,view(cpp)nd}}}
+  
+  
+Destructor {{{*(clang::NamedDecl *)this,view(cpp)nd}}}
+  
   
 {Name,view(cpp)}
 {Name}
@@ -83,6 +108,9 @@
 union {Name,view(cpp)}
 class {Name,view(cpp)}
 enum {Name,view(cpp)}
+
+  (clang::DeclContext *)this
+
   
   
 {*decl}
@@ -97,7 +125,6 @@
   *(clang::TagType *)this
 
   
-
   
 {*Replaced,view(cpp)} = {CanonicalType,view(cpp)}
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18299: Better visualization of clang::BuiltinType in VisualStudio

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner, aemerson.
mspertus added a subscriber: cfe-commits.

Whenever possible, use C++ names for visualizing builtin types. E.g., `long 
double` instead of `LongDouble`

Committed as revision 263891 for post-commit review

http://reviews.llvm.org/D18299

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -189,7 +189,33 @@
   
 
   
+  
   
+void
+bool
+char
+unsigned 
char
+wchar_t
+char16_t
+char32_t
+unsigned 
short
+unsigned 
int
+unsigned 
long
+unsigned long 
long
+__uint128_t
+char
+signed 
char
+wchar_t
+short
+int
+long
+long 
long
+__int128_t
+__fp16
+float
+double
+long 
double
+nullptr_t
 {(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, 
en}
 
   (clang::BuiltinType::Kind)BuiltinTypeBits.Kind


Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -189,7 +189,33 @@
   
 
   
+  
   
+void
+bool
+char
+unsigned char
+wchar_t
+char16_t
+char32_t
+unsigned short
+unsigned int
+unsigned long
+unsigned long long
+__uint128_t
+char
+signed char
+wchar_t
+short
+int
+long
+long long
+__int128_t
+__fp16
+float
+double
+long double
+nullptr_t
 {(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}
 
   (clang::BuiltinType::Kind)BuiltinTypeBits.Kind
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18297: Visualizer for clang::FunctionProtoType

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Based on Aaron's agreement to conducting post-commit reviews, I've committed 
this as revision 263890. Please let me know if I should not have done so. (This 
change is a lot smaller and simpler than I feared when I commented on my 
roadmap in diff http://reviews.llvm.org/D18270, so I think this is a good 
inaugural post-commit review for me).


http://reviews.llvm.org/D18297



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18297: Visualizer for clang::FunctionProtoType

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner, aemerson.
mspertus added a subscriber: cfe-commits.

Visualizer for clang::FunctionProtoType

Displays return type and parameters for the Function Protoype object in the 
Locals window. For example, the prototype `int(double, A *)` displays as

```
T Int(Double, struct A *)
|-ReturnType  Int
|-Parameter Types Double, struct A *
 |-[0]BuiltinType {Double}
 |-[1]PointerType {struct A *}
| /* More stuff */
```



http://reviews.llvm.org/D18297

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -29,6 +29,7 @@
 {*(clang::TemplateTypeParmType *)this}
 {*(clang::SubstTemplateTypeParmType *)this}
 {*(clang::RecordType *)this}
+{*(clang::FunctionProtoType *)this}
 {*this,view(poly)}
 {*this,view(cmn)}" 
 {*this,view(cmn)}  {{{*this,view(poly)}}}
@@ -44,6 +45,7 @@
   (clang::TemplateTypeParmType
 *)this
   (clang::SubstTemplateTypeParmType
 *)this
   (clang::RecordType 
*)this
+  (clang::FunctionProtoType
 *)this
 
   
   
@@ -132,6 +134,36 @@
   *Replaced
 
   
+  
+  
+
+{*(clang::QualType 
*)(this+1),view(cpp)}{*this,view(parm1)}
+
+, {*((clang::QualType 
*)(this+1)+1),view(cpp)}{*this,view(parm2)}
+
+, {*((clang::QualType 
*)(this+1)+2),view(cpp)}{*this,view(parm3)}
+
+, {*((clang::QualType 
*)(this+1)+3),view(cpp)}{*this,view(parm4)}
+
+, {*((clang::QualType 
*)(this+1)+4),view(cpp)}{*this,view(parm5)}
+
+, /* expand for more params 
*/
+{ResultType,view(cpp)}({*this,view(parm0)})
+
+  ResultType
+  
+{*this,view(parm0)}
+
+  
+NumParams
+(clang::QualType *)(this+1)
+  
+
+  
+  *(clang::Type *)this, view(cmn)
+
+  
   
 typename {*TTPDecl,view(cpp)}
   


Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -29,6 +29,7 @@
 {*(clang::TemplateTypeParmType *)this}
 {*(clang::SubstTemplateTypeParmType *)this}
 {*(clang::RecordType *)this}
+{*(clang::FunctionProtoType *)this}
 {*this,view(poly)}
 {*this,view(cmn)}" 
 {*this,view(cmn)}  {{{*this,view(poly)}}}
@@ -44,6 +45,7 @@
   (clang::TemplateTypeParmType *)this
   (clang::SubstTemplateTypeParmType *)this
   (clang::RecordType *)this
+  (clang::FunctionProtoType *)this
 
   
   
@@ -132,6 +134,36 @@
   *Replaced
 
   
+  
+  
+
+{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}
+
+, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}
+
+, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}
+
+, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}
+
+, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}
+
+, /* expand for more params */
+{ResultType,view(cpp)}({*this,view(parm0)})
+
+  ResultType
+  
+{*this,view(parm0)}
+
+  
+NumParams
+(clang::QualType *)(this+1)
+  
+
+  
+  *(clang::Type *)this, view(cmn)
+
+  
   
 typename {*TTPDecl,view(cpp)}
   
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18270: Typesafe visualization of PointerIntPairs in Visual Studio

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner, aemerson.
mspertus added a subscriber: cfe-commits.

In the `` of `PointerIntPair` , I cast the pointer to the actual 
type, so VS can leverage it while visualizing, not unlike the recent change to 
`PointerUnion` visualization.
In the expansion, the current code is casting to the incorrect type (wrong 
number of stars), so I fixed that as well.

Note to Reviewers: I will continue to make frequent changes to the MSVC 
visualizers. While these are worthwhile, I don't want to overwhelm the 
reviewers. Is it OK for me to request review after commit in the future when I 
judge that it is appropriate to do so (E.g., this diff)?

http://reviews.llvm.org/D18270

Files:
  llvm.natvis

Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -46,9 +46,9 @@
   
 
   
-{(void*)(Value  PointerBitMask)} [{($T3)((Value 
 IntShift)  IntMask)}]
+{IntMask}: {($T1)(Value  PointerBitMask)} 
[{($T3)((Value  IntShift)  IntMask)}]
 
-  ($T1*)(Value  PointerBitMask)
+  ($T1)(Value  PointerBitMask)
   ($T3)((Value  IntShift)  IntMask)
 
   


Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -46,9 +46,9 @@
   
 
   
-{(void*)(Value  PointerBitMask)} [{($T3)((Value  IntShift)  IntMask)}]
+{IntMask}: {($T1)(Value  PointerBitMask)} [{($T3)((Value  IntShift)  IntMask)}]
 
-  ($T1*)(Value  PointerBitMask)
+  ($T1)(Value  PointerBitMask)
   ($T3)((Value  IntShift)  IntMask)
 
   
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18163: Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Forgot to close the revision


http://reviews.llvm.org/D18163



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r263794 - Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-19 Thread Mike Spertus via cfe-commits
Author: mps
Date: Fri Mar 18 11:38:34 2016
New Revision: 263794

URL: http://llvm.org/viewvc/llvm-project?rev=263794=rev
Log:
Show members of DeclContexts (i.e., class members) in Visual Studio native 
visualizers

This change shows members of DeclContext objects in the Visual Studio debugger. 
It will also cast a TagType like a class or a struct to a DeclContext, so its 
methods and fields are visualized. 


Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=263794=263793=263794=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Fri Mar 18 11:38:34 2016
@@ -73,6 +73,31 @@ or create a symbolic link so it updates
   
 {ModifiedType} 
Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
   
+  
+  
+  
+{(clang::Decl::Kind)DeclKind,en}Decl
+
+  (clang::Decl::Kind)DeclKind,en
+  
+FirstDecl
+(clang::Decl *)(NextInContextAndBits.Value  
~3)
+*this
+  
+
+  
+  
+Field {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Method {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Constructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
+  
+Destructor {{{*(clang::NamedDecl 
*)this,view(cpp)nd}}}
+  
   
 {Name,view(cpp)}
 {Name}
@@ -83,6 +108,9 @@ or create a symbolic link so it updates
 union 
{Name,view(cpp)}
 class 
{Name,view(cpp)}
 enum 
{Name,view(cpp)}
+
+  (clang::DeclContext *)this
+
   
   
 {*decl}
@@ -97,7 +125,6 @@ or create a symbolic link so it updates
   *(clang::TagType *)this
 
   
-
   
 {*Replaced,view(cpp)} = 
{CanonicalType,view(cpp)}
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-18 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Thanks, Aaron. Committed as revision 263794


http://reviews.llvm.org/D18261



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18270: Typesafe visualization of PointerIntPairs in Visual Studio

2016-03-18 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Committed as revision 263821.

Thanks for the trust, Aaron! Note that my next revision (function and member 
prototype visualization) will be largish, and I would still appreciate a review 
before commit.


http://reviews.llvm.org/D18270



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18163: Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-14 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

This adds visualizers for PointerType and TemplateTypeParmType. 

As I have been using these visualizers, I have found the DisplayStrings to be 
too verbose to cleanly see in the Locals Window, so I have changed the Display 
Strings to display in a more C++-like style. For example, instead of a 
SubstTemplateTypeParmType displaying as

  SubstTemplateTypeParmType: {Identifier (("T"))} => Record (25), {Identifier 
(("A"))}

it now displays more readably as

  SubstTemplateTypeParmType: {typename T <= struct A} 

The `` sections still can be used for all the gory details if necessary


http://reviews.llvm.org/D18163

Files:
  clang.natvis

Index: clang.natvis
===
--- clang.natvis
+++ clang.natvis
@@ -6,46 +6,91 @@
 or create a symbolic link so it updates automatically.
 -->
 http://schemas.microsoft.com/vstudio/debugger/natvis/2010;>
+
   
-{(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
+
+{(clang::Type::TypeClass)TypeBits.TC, en}Type
+
+{*(clang::BuiltinType *)this}
+{*(clang::PointerType *)this}
+{*(clang::AttributedType *)this}
+{*(clang::TemplateTypeParmType *)this}
+{*(clang::SubstTemplateTypeParmType *)this}
+{*(clang::RecordType *)this}
+{*this,view(poly)}
+{*this,view(cmn)}" 
+{*this,view(cmn)}  {{{*this,view(poly)}}}
+
+  (clang::Type::TypeClass)TypeBits.TC
+  TypeBits
+  CanonicalType
+  *(clang::BuiltinType *)this
+  *(clang::PointerType *)this
+  *(clang::AttributedType *)this
+  (clang::TemplateTypeParmType *)this
+  (clang::SubstTemplateTypeParmType *)this
+  (clang::RecordType *)this
+
+  
+  
+{PointeeType, view(poly)} *
+
+  *(clang::Type *)this, view(cmn)
+  PointeeType
 
   
+  
+{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}
+  
+  
+{Name,view(cpp)}
+{Name}
+  
+  
+struct {Name,view(cpp)}
+interface {Name,view(cpp)}
+union {Name,view(cpp)}
+class {Name,view(cpp)}
+enum {Name,view(cpp)}
+  
   
 {*decl}
 
+  *(clang::Type *)this, view(cmn)
   decl
 
   
   
-{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType *)this}
+{*(clang::TagType *)this}
 
   *(clang::TagType *)this
 
   
+
   
-{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} = {CanonicalType}
+{*Replaced,view(cpp)} = {CanonicalType,view(cpp)}
 
-  *(clang::Type *)this, view(BaseOnly)
+  *(clang::Type *)this, view(cmn)
   *Replaced
 
   
   
-{*TTPDecl}
+typename {*TTPDecl,view(cpp)}
   
   
 
+{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType,view(poly)}
+{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType,view(cpp)}
 {*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType}
 
   *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  4) - 1)))-BaseType
@@ -70,22 +115,21 @@
   (clang::BuiltinType::Kind)BuiltinTypeBits.Kind
 
   
-  
-{Name}
-  
+
   
 {(clang::TemplateDecl *)((Template.Storage.Val.Val.Value  2)  2)}
 {Template.Storage}
   
   
-({((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s})
+{((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,sb}
 
   ((llvm::StringMapEntryclang::IdentifierInfo **)Entry)+1,s
   (clang::tok::TokenKind)TokenID
 
   
   
 Empty
+{*(clang::IdentifierInfo *)(Ptr  ~PtrMask)}
 {{Identifier ({*(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
 {{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
 {{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr  ~PtrMask)})}}
___
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

2016-03-14 Thread Mike Spertus via cfe-commits
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] D18076: Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness

2016-03-11 Thread Mike Spertus via cfe-commits
mspertus closed this revision.
mspertus added a comment.

Committed as svn revision 263270


http://reviews.llvm.org/D18076



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18076: Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness

2016-03-11 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 50432.
mspertus added a comment.

Applying same logic to PointerUnion3 and PointerUnion4 as suggested by Aaron


http://reviews.llvm.org/D18076

Files:
  llvm.natvis

Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -54,30 +54,30 @@
   
 
   
-{"$T1", s8b} {(void*)(Val.Value  
Val.PointerBitMask)}
-{"$T2", s8b} {(void*)(Val.Value  
Val.PointerBitMask)}
+{"$T1", s8b}: {($T1)(Val.Value  
Val.PointerBitMask)}
+{"$T2", s8b}: {($T2)(Val.Value  
Val.PointerBitMask)}
 
   ($T1)(Val.Value  Val.PointerBitMask)
   ($T2)(Val.Value  Val.PointerBitMask)
 
   
 
   
-{"$T1", s8b} {(void*)((Val.Val.Value  2) 
 2)}
-{"$T2", s8b} 
{(void*)((Val.Val.Value  2)  2)}
-{"$T3", s8b} 
{(void*)((Val.Val.Value  2)  2)}
+{"$T1", s8b}: {($T1)((Val.Val.Value  2) 
 2)}
+{"$T2", s8b}: 
{($T2)((Val.Val.Value  2)  2)}
+{"$T3", s8b}: 
{($T3)((Val.Val.Value  2)  2)}
 
   ($T1)((Val.Val.Value  2)  
2)
   ($T2)((Val.Val.Value  2)  2)
   ($T3)((Val.Val.Value  2)  2)
 
   
 
   
-{"$T1", 
s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T2", s8b} {(void*)((Val.Val.Value  2) 
 2)}
-{"$T3", s8b} {(void*)((Val.Val.Value  2) 
 2)}
-{"$T4", s8b} 
{(void*)((Val.Val.Value  2)  2)}
+{"$T1", 
s8b}: {($T1)((Val.Val.Value  2)  2)}
+{"$T2", s8b}: {($T2)((Val.Val.Value  2) 
 2)}
+{"$T3", s8b}: {($T3)((Val.Val.Value  2) 
 2)}
+{"$T4", s8b}: 
{($T4)((Val.Val.Value  2)  2)}
 
   ($T1)((Val.Val.Value  2)  2)
   ($T2)((Val.Val.Value  2)  
2)


Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -54,30 +54,30 @@
   
 
   
-{"$T1", s8b} {(void*)(Val.Value  Val.PointerBitMask)}
-{"$T2", s8b} {(void*)(Val.Value  Val.PointerBitMask)}
+{"$T1", s8b}: {($T1)(Val.Value  Val.PointerBitMask)}
+{"$T2", s8b}: {($T2)(Val.Value  Val.PointerBitMask)}
 
   ($T1)(Val.Value  Val.PointerBitMask)
   ($T2)(Val.Value  Val.PointerBitMask)
 
   
 
   
-{"$T1", s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T2", s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T3", s8b} {(void*)((Val.Val.Value  2)  2)}
+{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
+{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
+{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
 
   ($T1)((Val.Val.Value  2)  2)
   ($T2)((Val.Val.Value  2)  2)
   ($T3)((Val.Val.Value  2)  2)
 
   
 
   
-{"$T1", s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T2", s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T3", s8b} {(void*)((Val.Val.Value  2)  2)}
-{"$T4", s8b} {(void*)((Val.Val.Value  2)  2)}
+{"$T1", s8b}: {($T1)((Val.Val.Value  2)  2)}
+{"$T2", s8b}: {($T2)((Val.Val.Value  2)  2)}
+{"$T3", s8b}: {($T3)((Val.Val.Value  2)  2)}
+{"$T4", s8b}: {($T4)((Val.Val.Value  2)  2)}
 
   ($T1)((Val.Val.Value  2)  2)
   ($T2)((Val.Val.Value  2)  2)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18076: Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness

2016-03-11 Thread Mike Spertus via cfe-commits
mspertus added a comment.

Good catch. Give me two minutes


http://reviews.llvm.org/D18076



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18076: Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness

2016-03-10 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.

The Visual Studio native visualizer in llvm.natvis displays the actual pointer 
in a PointerUnion as a void *. E.g.

clang::Type const *: 0x02c4a880

Which doesn't make clear what the type looks like. With this change, we will 
display an actual Type *, resulting in a much better visualization that makes 
it clear that the clang::Type is a PointerType representing "Int *"

clang::Type const *: 0x02c4a880 PointerType: BuiltinType: Int *

(Note, the above uses an upcoming visualizer for clang::PointerType because 
that is my test case, but that is orthogonal to this change).

http://reviews.llvm.org/D18076

Files:
  llvm.natvis

Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -54,8 +54,8 @@
   
 
   
-{"$T1", s8b} {(void*)(Val.Value  
Val.PointerBitMask)}
-{"$T2", s8b} {(void*)(Val.Value  
Val.PointerBitMask)}
+{"$T1", s8b}: {($T1)(Val.Value  
Val.PointerBitMask)}
+{"$T2", s8b}: {($T2)(Val.Value  
Val.PointerBitMask)}
 
   ($T1)(Val.Value  Val.PointerBitMask)
   ($T2)(Val.Value  Val.PointerBitMask)


Index: llvm.natvis
===
--- llvm.natvis
+++ llvm.natvis
@@ -54,8 +54,8 @@
   
 
   
-{"$T1", s8b} {(void*)(Val.Value  Val.PointerBitMask)}
-{"$T2", s8b} {(void*)(Val.Value  Val.PointerBitMask)}
+{"$T1", s8b}: {($T1)(Val.Value  Val.PointerBitMask)}
+{"$T2", s8b}: {($T2)(Val.Value  Val.PointerBitMask)}
 
   ($T1)(Val.Value  Val.PointerBitMask)
   ($T2)(Val.Value  Val.PointerBitMask)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r262933 - Add Visual Studio native visualizers for several Clang types

2016-03-08 Thread Mike Spertus via cfe-commits
Author: mps
Date: Tue Mar  8 10:14:23 2016
New Revision: 262933

URL: http://llvm.org/viewvc/llvm-project?rev=262933=rev
Log:
Add Visual Studio native visualizers for several Clang types

This is one of a series of changes to improve the MSVC visualization of Clang 
types.
This one focuses on Record and SubstTemplateTypeParmType meaning that, for 
example,
a TemplateArgumentLoc no longer displays incomprehensibly in the locals window 
as

  {Argument={DeclArg={Kind=1 QT=0x033acb00 D=0x {DeclType=???}}...

but instead much more usefully as

  Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => 
Record, {Identifier (("A"))}

Additional types and improvements will be made in subsequent commits


Modified:
cfe/trunk/utils/clang.natvis

Modified: cfe/trunk/utils/clang.natvis
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=262933=262932=262933=diff
==
--- cfe/trunk/utils/clang.natvis (original)
+++ cfe/trunk/utils/clang.natvis Tue Mar  8 10:14:23 2016
@@ -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})
@@ -32,14 +95,14 @@ or create a symbolic link so it updates
   *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
   *(clang::IdentifierInfo *)(Ptr  
~PtrMask)
   (clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra
 *)(Ptr  ~PtrMask))-ExtraKindOrNumArgs
-
-  
-  
-{(clang::tok::TokenKind)Kind}
-{{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}
-  
-  
-[{(clang::DeclSpec::SCS)StorageClassSpec}], 
[{(clang::TypeSpecifierType)TypeSpecType}]
+
+  
+  
+{(clang::tok::TokenKind)Kind,en}
+{{Identifier 
({*(clang::IdentifierInfo *)(PtrData)})}}
+  
+  
+[{(clang::DeclSpec::SCS)StorageClassSpec}], 
[{(clang::TypeSpecifierType)TypeSpecType}]
   
   
 {Name,s}
@@ -65,4 +128,10 @@ or create a symbolic link so it updates
   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

2016-03-07 Thread Mike Spertus via cfe-commits
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

2016-03-07 Thread Mike Spertus via cfe-commits
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

2016-03-07 Thread Mike Spertus via cfe-commits
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

2016-03-07 Thread Mike Spertus via cfe-commits
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


[PATCH] D17908: Add Visual Studio Visualizers for more Clang types

2016-03-05 Thread Mike Spertus via cfe-commits
mspertus created this revision.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

This is the first of a series of patches to add additional Visual Studio native 
visualizers for subclasses of clang::Type. For example, a 
SubstTemplateTypeParmType where the template type parameter "T" is replaced by 
the class "A" will show as follows in the locals window:

  Type (1), SubstTemplateTypeParm (30): {Identifier (("T"))} => Record (25), 
{Identifier (("A"))} 

Once this is accepted, I will continue to add further clang Type subclasses

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  clang::TypeAlignmentInBits) - 1)))-BaseType}
+
+  *((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value)  ~(uintptr_t)((1  clang::TypeAlignmentInBits) - 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


  1   2   >