Lines Matching defs:type

39 is_friend (tree type, tree supplicant)
45 if (supplicant == NULL_TREE || type == NULL_TREE)
53 tree list = DECL_FRIENDLIST (TYPE_MAIN_DECL (type));
79 /* It's a type. */
81 if (same_type_p (supplicant, type))
84 list = CLASSTYPE_FRIEND_CLASSES (TREE_TYPE (TYPE_MAIN_DECL (type)));
119 return is_friend (type, context);
124 /* Add a new friend to the friends of the aggregate type TYPE.
132 add_friend (tree type, tree decl, bool complain)
142 typedecl = TYPE_MAIN_DECL (type);
145 type = TREE_TYPE (typedecl);
158 decl, type);
163 maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1);
176 maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1);
181 if (!uses_template_parms (type))
183 = tree_cons (NULL_TREE, type,
190 when its definition is seen. If a type is defined, then its TYPE_DECL's
192 classes that are not defined. If a type has not yet been defined,
202 make_friend_class (tree type, tree friend_type, bool complain)
228 int class_template_depth = template_class_depth (type);
233 error ("invalid type %qT declared %<friend%>", friend_type);
254 else if (same_type_p (type, friend_type))
258 type);
341 error ("template parameter type %qT declared %<friend%>", friend_type);
358 for (classes = CLASSTYPE_FRIEND_CLASSES (type);
369 warning (0, "%qD is already a friend of %qT", probe, type);
378 warning (0, "%qT is already a friend of %qT", probe, type);
386 maybe_add_class_template_decl_list (type, friend_type, /*friend_p=*/1);
388 CLASSTYPE_FRIEND_CLASSES (type)
389 = tree_cons (NULL_TREE, friend_type, CLASSTYPE_FRIEND_CLASSES (type));
392 if (!uses_template_parms (type))
394 = tree_cons (NULL_TREE, type,
495 error ("member %qD declared as friend before type %qT defined",