* semantics.c (describable_type): Don't pretend to be in a template.

From-SVN: r151335
This commit is contained in:
Jason Merrill 2009-09-02 11:48:52 -04:00 committed by Jason Merrill
parent 301ea09431
commit aef8bce8f8
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,6 @@
2009-09-01 Jason Merrill <jason@redhat.com>
2009-09-02 Jason Merrill <jason@redhat.com>
* semantics.c (describable_type): Don't pretend to be in a template.
* ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.

View File

@ -4543,17 +4543,13 @@ describable_type (tree expr)
{
tree type = NULL_TREE;
/* processing_template_decl isn't set when we're called from the mangling
code, so bump it now. */
++processing_template_decl;
if (! type_dependent_expression_p (expr)
&& ! type_unknown_p (expr))
{
type = TREE_TYPE (expr);
type = unlowered_expr_type (expr);
if (real_lvalue_p (expr))
type = build_reference_type (type);
}
--processing_template_decl;
if (type)
return type;