Commit ddd792fa by Nathan Sidwell

[PR90916] Use TI accessor.

	PR c++/90916
	* pt.c (retrieve_specialization): Use get_template_info, not open
	coding access.
parent 288c5324
2020-01-14 Nathan Sidwell <nathan@acm.org> 2020-01-14 Nathan Sidwell <nathan@acm.org>
PT c++/90916
* pt.c (retrieve_specialization): Use get_template_info, not open
coding access.
PR c++/90916 PR c++/90916
* pt.c (retrieve_specialization): Get the TI from the decl or the * pt.c (retrieve_specialization): Get the TI from the decl or the
classtype as appropriate. classtype as appropriate.
......
...@@ -1252,9 +1252,7 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash) ...@@ -1252,9 +1252,7 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash)
for (ovl_iterator iter (fns); iter; ++iter) for (ovl_iterator iter (fns); iter; ++iter)
{ {
tree fn = *iter; tree fn = *iter;
if (tree ti = (TREE_CODE (fn) == TYPE_DECL && !TYPE_DECL_ALIAS_P (fn) if (tree ti = get_template_info (fn))
? TYPE_TEMPLATE_INFO (TREE_TYPE (fn))
: DECL_TEMPLATE_INFO (fn)))
if (TI_TEMPLATE (ti) == tmpl if (TI_TEMPLATE (ti) == tmpl
/* using-declarations can bring in a different /* using-declarations can bring in a different
instantiation of tmpl as a member of a different instantiation of tmpl as a member of a different
......
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