Commit 7c586749 by Jason Merrill Committed by Jason Merrill

PR c++/78690 - ICE with using and global type with same name

	* pt.c (type_dependent_object_expression_p): True for
	IDENTIFIER_NODE.

From-SVN: r245549
parent a530e181
2017-02-17 Jason Merrill <jason@redhat.com>
PR c++/78690 - ICE with using and global type with same name
* pt.c (type_dependent_object_expression_p): True for
IDENTIFIER_NODE.
PR c++/79549 - C++17 ICE with non-type auto template parameter pack
* pt.c (convert_template_argument): Just return an auto arg pack.
(tsubst_template_args): Don't tsubst an auto pack type.
......
......@@ -23932,6 +23932,10 @@ type_dependent_expression_p (tree expression)
bool
type_dependent_object_expression_p (tree object)
{
/* An IDENTIFIER_NODE can sometimes have a TREE_TYPE, but it's still
dependent. */
if (TREE_CODE (object) == IDENTIFIER_NODE)
return true;
tree scope = TREE_TYPE (object);
return (!scope || dependent_scope_p (scope));
}
......
// PR c++/78690
struct C;
template <typename T>
struct A
{
struct C { static void bar (); };
};
template <typename T>
struct B
{
using A<T>::C;
void
foo () { C.bar (); }
};
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