[cfe-dev] Visual Studio visualizer improvements for Clang

Michael Spertus via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 16 10:06:23 PDT 2016


I am not using plugins (yet!). Visual Studio supports XML-based visualizers<https://msdn.microsoft.com/en-us/library/jj620914.aspx> that let you specify how your types are displayed in at least a limited way.  I added this functionality by editing  clang/utils/clang.natvis.

Mike

From: C Bergström [mailto:cbergstrom at pathscale.com]
Sent: Wednesday, March 16, 2016 11:59 AM
To: Michael Spertus <mike_spertus at symantec.com>
Cc: cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] Visual Studio visualizer improvements for Clang

Looks cool! I'm not a VS guy - how did you achieve this? Was there some source changes in clang or is this a plugin that leverages clang for VS?
Thanks

On Wed, Mar 16, 2016 at 11:04 PM, Michael Spertus via cfe-dev <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>> wrote:
Chandler suggested that I socialize the improvements that I have been making to Clang data structure visualizations in Visual Studio. For example, these changes replace the traditional incomprehensible Locals/Watch display of a TemplateArgumentLoc

[cid:image001.png at 01D17F7C.136D2F90]

Now it clearly displays that it is a Type Template Parameter where T has been replaced by struct A.
[cid:image002.png at 01D17F7C.136D2F90]

I only have a small portion of the Clang data types done so far, but it is already really helping me keep track of what is going on while debugging Clang (It’s also been an excellent way for me to learn Clang data structures ☺ ). I will be continuing to add further visualizations over the next few weeks and ongoing.

I hope these prove helpful to the community,

Mike

_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160316/95dd6b83/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 14085 bytes
Desc: image001.png
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160316/95dd6b83/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 11842 bytes
Desc: image002.png
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160316/95dd6b83/attachment-0001.png>


More information about the cfe-dev mailing list