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
This commit is contained in:
Mike Spertus 2016-06-12 22:21:56 +00:00
parent d6da1a097b
commit 47f4890bc1
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -309,6 +309,17 @@ For later versions of Visual Studio, no setup is required-->
<Item Name="TemplateList">TemplateArgumentLists</Item>
</Expand>
</Type>
<Type Name="clang::ParsedTemplateArgument">
<DisplayString Condition="Kind==clang::ParsedTemplateArgument::Type">Type template argument: {*(clang::QualType *)Arg}</DisplayString>
<DisplayString Condition="Kind==clang::ParsedTemplateArgument::NonType">Non-type template argument: {*(clang::Expr *)Arg}</DisplayString>
<DisplayString Condition="Kind==clang::ParsedTemplateArgument::Template">Template template argument: {*(clang::TemplateName *)Arg</DisplayString>
<Expand>
<Item Name="Kind">Kind,en</Item>
<Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Type">(clang::QualType *)Arg</Item>
<Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::NonType">(clang::Expr *)Arg</Item>
<Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Template">(clang::TemplateName *)Arg</Item>
</Expand>
</Type>
<!-- Builtin types that have C++ keywords are manually displayed as that keyword. Otherwise, just use the enum name -->
<Type Name="clang::BuiltinType">
<DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>