Commit e383e095 by Kai Tietz Committed by Kai Tietz

re PR c++/64100 (A static assert using the the current class in a noexcept test…

re PR c++/64100 (A static assert using the the current class in a noexcept test leads to a segfault)

	PR c++/64100
	* typeck.c (lookup_destructor): Handle incomplete type.

From-SVN: r218571
parent e2c04e08
2014-12-10 Kai Tietz <ktietz@redhat.com>
PR c++/64100
* typeck.c (lookup_destructor): Handle incomplete type.
2014-12-09 Jason Merrill <jason@redhat.com>
PR c++/64129
......
......@@ -2536,6 +2536,12 @@ lookup_destructor (tree object, tree scope, tree dtor_name,
expr = lookup_member (dtor_type, complete_dtor_identifier,
/*protect=*/1, /*want_type=*/false,
tf_warning_or_error);
if (!expr)
{
if (complain & tf_error)
cxx_incomplete_type_error (dtor_name, dtor_type);
return error_mark_node;
}
expr = (adjust_result_of_qualified_name_lookup
(expr, dtor_type, object_type));
if (scope == NULL_TREE)
......
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