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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 06:56:39 PDT 2016


aaron.ballman added inline comments.

================
Comment at: clang.natvis:25
@@ +24,3 @@
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin" IncludeView="poly">{*(clang::BuiltinType *)this}</DisplayString>
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
+    <DisplayString Condition="TypeBits.TC==clang::Type::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
----------------
If we're handling pointers, perhaps we should also do references similarly? Also, perhaps functions as well (bonus points if you can suss out the function prototype and display it!)?

================
Comment at: clang.natvis:26
@@ +25,3 @@
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
+    <DisplayString Condition="TypeBits.TC==clang::Type::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
+    <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>
----------------
I think this should be `TypeBits.TC==clang::Type::TypeClass::Attributed` instead.


http://reviews.llvm.org/D18163





More information about the cfe-commits mailing list