* search.c (lookup_base): Handle NULL_TREE.

From-SVN: r196738
This commit is contained in:
Jason Merrill 2013-03-16 22:37:33 -04:00 committed by Jason Merrill
parent b7df43cdb4
commit ca2e264dd6
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2013-03-16 Jason Merrill <jason@redhat.com>
* search.c (lookup_base): Handle NULL_TREE.
PR c++/56481
* semantics.c (potential_constant_expression_1): Use of 'this' in
a non-constexpr function makes the expression not potentially

View File

@ -188,6 +188,14 @@ lookup_base (tree t, tree base, base_access access,
tree t_binfo;
base_kind bk;
/* "Nothing" is definitely not derived from Base. */
if (t == NULL_TREE)
{
if (kind_ptr)
*kind_ptr = bk_not_base;
return NULL_TREE;
}
if (t == error_mark_node || base == error_mark_node)
{
if (kind_ptr)