Commit aef8bce8 by Jason Merrill Committed by Jason Merrill

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

From-SVN: r151335
parent 301ea094
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. * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
......
...@@ -4543,17 +4543,13 @@ describable_type (tree expr) ...@@ -4543,17 +4543,13 @@ describable_type (tree expr)
{ {
tree type = NULL_TREE; 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) if (! type_dependent_expression_p (expr)
&& ! type_unknown_p (expr)) && ! type_unknown_p (expr))
{ {
type = TREE_TYPE (expr); type = unlowered_expr_type (expr);
if (real_lvalue_p (expr)) if (real_lvalue_p (expr))
type = build_reference_type (type); type = build_reference_type (type);
} }
--processing_template_decl;
if (type) if (type)
return type; return type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment