Commit 35fce3ce by Mark Mitchell

decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it uses template parameters.

	* decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it
	uses template parameters.

From-SVN: r21548
parent 9471ad13
......@@ -1642,8 +1642,9 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
/* Now that we've updated the context, we need to remangle the
name for this TYPE_DECL. */
DECL_ASSEMBLER_NAME (value) = DECL_NAME (value);
DECL_ASSEMBLER_NAME (value) =
get_identifier (build_overload_name (TREE_TYPE (value), 1, 1));
if (!uses_template_parms (value))
DECL_ASSEMBLER_NAME (value) =
get_identifier (build_overload_name (TREE_TYPE (value), 1, 1));
pushdecl_class_level (value);
return value;
......
// Build don't link:
template <int B>
class foo;
template <class U>
class bar
{
typedef foo<(U::id > 0)> foobar;
};
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