Commit Graph

37 Commits

Author SHA1 Message Date
Mike Spertus 49068a054b Improve MSVC visualizations so the parser shows where we are in the code
Also provide a visualizer for lambda introducers

llvm-svn: 368029
2019-08-06 13:29:35 +00:00
Mike Spertus 9aeab53eba 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

llvm-svn: 367199
2019-07-29 03:34:40 +00:00
Mike Spertus f6ce7ddecb Template-related improvements to Visual Studio visualizers
llvm-svn: 366007
2019-07-13 15:27:53 +00:00
Mike Spertus cf45cb0b9d Improve MSVC visualization of annot_template_id tokens
Now shows the actual annotated template. E.g.,
{annot_template_id (A<int, double>)}

Also a few miscellaneous fixes to visualizers of other types

llvm-svn: 365248
2019-07-05 21:41:30 +00:00
Mike Spertus fb133b0aab 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

llvm-svn: 364724
2019-06-30 22:04:25 +00:00
Mike Spertus 08c699a110 MSVC visualizers for type aliases
For example, the following TypeAliasTemplateDecl now displays in the autos window as
template<class T> using type_identity_t = type_identity<T>::type;

llvm-svn: 364145
2019-06-23 01:15:48 +00:00
Mike Spertus d050479be5 Natural MSVC visualization of constructors
E.g., Allow MSVC to visualize a CXXConstructorDecl like 
Constructor { Y(type_identity_t<T>)}

llvm-svn: 364138
2019-06-22 18:56:40 +00:00
Mike Spertus 1f50697abc 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

llvm-svn: 363574
2019-06-17 16:12:45 +00:00
Mike Spertus 4fc8c44382 Have MSVC Visualizer for DeducedTemplateSpecializationType show both the original template and deduced specialization
Now appears in the Autos window something like

- MyType	DeducedTemplateSpecializationType  {struct Y<int>}
|- Template	template<typename T> struct Y;
|- Deduced As	struct Y<int>
|- isDeduced	true	bool
|- TypeClass	DeducedTemplateSpecialization (36)
|- Flags	No TypeBits set beyond TypeClass
|- Canonical	RecordType  {struct Y<int>}

Also changed QualType visualization to auto-expand the BaseType

llvm-svn: 350487
2019-01-06 04:58:48 +00:00
Mike Spertus b25ced7480 Fix MSVC Visualization for TemplateTypeParmType and TemplateTypeParmDecl
llvm-svn: 350482
2019-01-05 23:15:30 +00:00
Mike Spertus 4f95b9cc29 Improve MSVC type visualizations
Display TypeBits in a single line. 
Fix bit rot in template visualizations
Rudimentary support for deduced types

llvm-svn: 350470
2019-01-05 17:01:34 +00:00
Mike Spertus 89073db6d2 Fix MSVC visualizations for ActionResult and OpaquePtr
Mainly just fixing buggy code. Also removed unnecessary visualizers
for specializations of OpaquePtr

llvm-svn: 350371
2019-01-03 23:24:39 +00:00
Mike Spertus 1950c8d597 Make clearer which clang::type subclasses have visualizers
llvm-svn: 350182
2018-12-31 23:01:34 +00:00
Mike Spertus 75644aab5d DeclAccessPair visualizer should be expandable
llvm-svn: 350167
2018-12-30 20:22:37 +00:00
Aaron Ballman 1455d4e155 Fix errors with the Clang natvis file.
This updates the FunctionProtoType visualizer to use the proper bits for determining parameter information and the DeclarationName visualizer to use the detail namespace. It also adds support for viewing newer special declaration names (like deduction guides).

Patch with help of Bruno Ricci.

llvm-svn: 349547
2018-12-18 21:42:20 +00:00
Mike Spertus 27c72d2fdb Improved Visual Studio visualization of OpaquePtr
Create a special visualizer for OpaquePtr<QualType> because the 
standard visualizer doesn't work with OpaquePtr<QualType>
due to QualType being heavily dependent on traits to be pointer-like.

Also, created an identical visualizer for UnionOpaquePtr

llvm-svn: 272531
2016-06-13 04:02:35 +00:00
Mike Spertus ce334cf156 Visual Studio Visualizer for PackExpansionType
llvm-svn: 272522
2016-06-12 22:54:46 +00:00
Mike Spertus 47f4890bc1 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.

llvm-svn: 272521
2016-06-12 22:21:56 +00:00
Mike Spertus 5bf7fd8185 Rudimentary support for Visual Studio Stmt visualizer
Better than nothing...

llvm-svn: 272518
2016-06-12 18:42:04 +00:00
Mike Spertus 897711f018 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

llvm-svn: 272487
2016-06-11 20:15:19 +00:00
Mike Spertus 334aa07915 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}

llvm-svn: 272448
2016-06-11 03:02:33 +00:00
Mike Spertus 3f19966441 Added missing close brace to OpaquePtr Visual Studio visualizer
This syntax error resulted in garbage being appended to OpaquePtr visualizations

llvm-svn: 272441
2016-06-10 22:25:43 +00:00
Mike Spertus 8a0a1d7385 Improve Visual Studio visualization of DeclaratorDecl
With this change, you can now expand its name and type.

llvm-svn: 271966
2016-06-07 00:27:37 +00:00
Mike Spertus 1f56e99933 Improved Visual Studio visualizations for template argument lists
Improved the visualizer for TemplateArgumentList to show type arguments in the DisplayString.
E.g., <double, long>. Added a visualizer for MultiLevelTemplateArgumentList.
I decided to display them by how they would appear in a template with the
(non-existent) template-id's omitted, so the DisplayString naturally presents
as something like <double, long>::<char *>.

llvm-svn: 271944
2016-06-06 21:41:20 +00:00
Mike Spertus 3d1ab08e8a Fix typo in last submission to visualize proper template argument
llvm-svn: 271911
2016-06-06 17:23:37 +00:00
Mike Spertus 603bbfca10 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., <int, double>

llvm-svn: 271910
2016-06-06 17:08:32 +00:00
Mike Spertus ef8c308d69 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.

llvm-svn: 271866
2016-06-06 03:37:18 +00:00
Mike Spertus 819fb787ce Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl
Now a TemplateTypeParm will be visualized as typename ...T if it is a pack

llvm-svn: 270521
2016-05-24 01:47:41 +00:00
Mike Spertus 64aa76d9ca Visualizer for Pack template arguments
llvm-svn: 270505
2016-05-23 22:27:44 +00:00
Mike Spertus b27ebb8824 Simple visualization of expressions
While more could be done, showing the type is a lot better than what is there now.

llvm-svn: 269623
2016-05-16 01:36:09 +00:00
Mike Spertus 8874ef7cf1 Fix redundant "typename typename T" in Visual Studio Native Visualizer
Also, a little minor cleanup

llvm-svn: 265338
2016-04-04 19:36:48 +00:00
Mike Spertus 63e428f5de Visual Studio native visualizers for clang::TemplateSpecializationType
Displays a template specialization as, say, A<int, double>. Does not
yet handle UncommonTemplateNameStorage, QualifiedTemplateName, or
DependentTemplateName, but still more than worthwhile

llvm-svn: 265104
2016-04-01 03:31:43 +00:00
Mike Spertus 61c3f39401 Visual Studio native visualization for clang::TemplateDecl
With this change, TemplateDecls display in the Locals Window something like

  template<typename T, typename U> struct A;

llvm-svn: 264997
2016-03-31 06:09:56 +00:00
Mike Spertus 1796c2e37b Visual Studio native visualization for TemplateParameterList and TemplateTypeParmDecl
With this change, a TemplateParameterList will suggestively display in the locals window something like:
  <typename T, int i>

llvm-svn: 264714
2016-03-29 10:57:24 +00:00
Mike Spertus a9ab71c65a Visual Studio native visualizer for InjectedClassNameType
Also fixes some omissions for TemplateSpecializationType

llvm-svn: 264710
2016-03-29 09:24:45 +00:00
Mike Spertus 1904598fff This file was accidentally committed with bad line endings. Fixed...
llvm-svn: 264621
2016-03-28 19:08:27 +00:00
Mike Spertus 6601a4420b 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).

llvm-svn: 264603
2016-03-28 18:03:37 +00:00