diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 15:39:55 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 15:39:55 +0000 |
commit | 19159b3ec4b14270bfb66ca39fd9b792b2812c5b (patch) | |
tree | b5d5974e5f21c797e1a2c1b6b7e6a8114295f367 | |
parent | 95e5c406ef4fe7b75a7c4c7f561929c6e9b9d5ce (diff) | |
download | gcc-19159b3ec4b14270bfb66ca39fd9b792b2812c5b.tar.gz |
2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
* name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184792 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6a92eeba555..1749cc134c7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-02 Paolo Carlini <paolo.carlini@oracle.com> + + * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up. + 2012-02-29 Jason Merrill <jason@redhat.com> PR c++/51930 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 235134249ac..e85d603d22f 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4467,20 +4467,17 @@ binding_to_template_parms_of_scope_p (cxx_binding *binding, cp_binding_level *scope) { tree binding_value; + tree tinfo; - if (!binding || !scope) + if (!binding || !scope || !scope->this_entity) return false; binding_value = binding->value ? binding->value : binding->type; + tinfo = get_template_info (scope->this_entity); - return (scope - && scope->this_entity - && get_template_info (scope->this_entity) - && PRIMARY_TEMPLATE_P (TI_TEMPLATE - (get_template_info (scope->this_entity))) - && parameter_of_template_p (binding_value, - TI_TEMPLATE (get_template_info \ - (scope->this_entity)))); + return (tinfo + && PRIMARY_TEMPLATE_P (TI_TEMPLATE (tinfo)) + && parameter_of_template_p (binding_value, TI_TEMPLATE (tinfo))); } /* Return the innermost non-namespace binding for NAME from a scope |