On 09/25/2011 05:06 PM, Fabien Chêne wrote:
+  else if ((using_decl = strip_using_decl (member)) != member)

+  /* If it is a using decl, use its underlying decl.  */
+  type_decl = strip_using_decl (type_decl);

-      if (DECL_NAME (field) == name
+      if (DECL_NAME (decl) == name
          && (!want_type
-             || TREE_CODE (field) == TYPE_DECL
-             || DECL_CLASS_TEMPLATE_P (field)))
-       return field;
+             || TREE_CODE (decl) == TYPE_DECL
+             || DECL_CLASS_TEMPLATE_P (decl)))
+       return decl;

Why do we need to strip the USING_DECL both in lookup_field_1 and in callers?

+      /* do not push the decl more than once */

Comments should start with a capital letter and end with a period. This should also say "unless we need to compare underlying types at instantiation time"

+         /* We allow pushing an enum multiple times in a class
+          * template in order to handle late matching of underlying
+          * type on an opaque-enum-declaration followed by an
+          * enum-specifier.  */

And we don't put * at the beginning of each line.

+         enumtype = xref_tag (enum_type, name, /*tag_scope=*/ts_current, 
false);
+          /* TARGET_BVAL is error_mark_node when TARGET_DECL's name has been 
used
+  else if (TREE_CODE (target_bval) == TYPE_DECL && DECL_ARTIFICIAL 
(target_bval)
+              || same_type_p (TREE_TYPE (target_decl), TREE_TYPE 
(target_bval))))
+  else if (TREE_CODE (target_decl) == VAR_DECL && TREE_CODE (target_bval) == 
VAR_DECL
+             if (TREE_CODE (target_decl) == TYPE_DECL && DECL_ARTIFICIAL 
(target_decl))
+      else if (TREE_CODE (target_decl) == OVERLOAD && is_overloaded_fn 
(target_bval))
+      else if (TREE_CODE (decl) == USING_DECL && is_overloaded_fn 
(target_bval))
+      else if (TREE_CODE (bval) == USING_DECL && is_overloaded_fn 
(target_decl))

These lines go past 80 characters.

Jason

Reply via email to