Lines Matching refs:declarator

856 /* An erroneous declarator.  */
863 /* Alloc BYTES from the declarator memory pool. */
871 /* Allocate a declarator of the indicated KIND. Clear fields that are
877 cp_declarator *declarator;
879 declarator = (cp_declarator *) alloc_declarator (sizeof (cp_declarator));
880 declarator->kind = kind;
881 declarator->attributes = NULL_TREE;
882 declarator->declarator = NULL;
884 return declarator;
887 /* Make a declarator for a generalized identifier. If
897 cp_declarator *declarator;
916 declarator = make_declarator (cdk_id);
917 declarator->u.id.qualifying_scope = qualifying_scope;
918 declarator->u.id.unqualified_name = unqualified_name;
919 declarator->u.id.sfk = sfk;
921 return declarator;
924 /* Make a declarator for a pointer to TARGET. CV_QUALIFIERS is a list
931 cp_declarator *declarator;
933 declarator = make_declarator (cdk_pointer);
934 declarator->declarator = target;
935 declarator->u.pointer.qualifiers = cv_qualifiers;
936 declarator->u.pointer.class_type = NULL_TREE;
938 return declarator;
946 cp_declarator *declarator;
948 declarator = make_declarator (cdk_reference);
949 declarator->declarator = target;
950 declarator->u.pointer.qualifiers = cv_qualifiers;
951 declarator->u.pointer.class_type = NULL_TREE;
953 return declarator;
963 cp_declarator *declarator;
965 declarator = make_declarator (cdk_ptrmem);
966 declarator->declarator = pointee;
967 declarator->u.pointer.qualifiers = cv_qualifiers;
968 declarator->u.pointer.class_type = class_type;
970 return declarator;
973 /* Make a declarator for the function given by TARGET, with the
984 cp_declarator *declarator;
986 declarator = make_declarator (cdk_function);
987 declarator->declarator = target;
988 declarator->u.function.parameters = parms;
989 declarator->u.function.qualifiers = cv_qualifiers;
990 declarator->u.function.exception_specification = exception_specification;
992 return declarator;
995 /* Make a declarator for an array of BOUNDS elements, each of which is
1001 cp_declarator *declarator;
1003 declarator = make_declarator (cdk_array);
1004 declarator->declarator = element;
1005 declarator->u.array.bounds = bounds;
1007 return declarator;
1012 /* Create a parameter declarator with the indicated DECL_SPECIFIERS,
1017 cp_declarator *declarator,
1029 parameter->declarator = declarator;
1039 function_declarator_p (const cp_declarator *declarator)
1041 while (declarator)
1043 if (declarator->kind == cdk_function
1044 && declarator->declarator->kind == cdk_id)
1046 if (declarator->kind == cdk_id
1047 || declarator->kind == cdk_error)
1049 declarator = declarator->declarator;
1128 /* We want a block declarator. */
1131 /* We want an abstract declarator. */
1133 /* We want a named declarator. */
1390 /* TRUE if we are presently parsing a declarator, after the
1391 direct-declarator. */
2142 cp_parser_check_for_definition_in_return_type (cp_declarator *declarator,
2148 while (declarator
2149 && (declarator->kind == cdk_pointer
2150 || declarator->kind == cdk_reference
2151 || declarator->kind == cdk_ptrmem))
2152 declarator = declarator->declarator;
2153 if (declarator
2154 && declarator->kind == cdk_function)
2512 cp_declarator *declarator
2515 property = grokdeclarator (declarator, &declspecs, NORMAL,0, NULL);
2816 /* We are not processing a declarator. */
3005 /* The address of the first non-permanent object on the declarator
3011 /* Create the declarator obstack, if necessary. */
3015 /* Create the error declarator. */
3019 /* Remember where the base of the declarator obstack lies. */
3051 /* Make sure the declarator obstack was fully cleaned up. */
3495 a declarator, rather than as part of an expression. */
3628 is true, the unqualified-id is appearing as part of a declarator,
3837 identifier in the declarator for a destructor declaration. */
3842 error ("typedef-name %qD used as destructor declarator",
3991 /* In a declarator-id like "X<T>::I::Y<T>" we must be able to
5426 /* There should not be a direct-new-declarator in this production,
5479 type-specifier-seq new-declarator [opt]
5490 cp_declarator *declarator;
5507 /* Parse the new-declarator. */
5514 declarator = new_declarator;
5516 while (declarator && (declarator->kind == cdk_pointer
5517 || declarator->kind == cdk_ptrmem))
5519 outer_declarator = declarator;
5520 declarator = declarator->declarator;
5522 while (declarator
5523 && declarator->kind == cdk_array
5524 && declarator->declarator
5525 && declarator->declarator->kind == cdk_array)
5527 outer_declarator = declarator;
5528 declarator = declarator->declarator;
5531 if (declarator && declarator->kind == cdk_array)
5533 *nelts = declarator->u.array.bounds;
5538 outer_declarator->declarator = declarator->declarator;
5552 /* Parse an (optional) new-declarator.
5554 new-declarator:
5555 ptr-operator new-declarator [opt]
5556 direct-new-declarator
5558 Returns the declarator. */
5574 cp_declarator *declarator;
5576 /* Parse another optional declarator. */
5577 declarator = cp_parser_new_declarator_opt (parser);
5579 /* Create the representation of the declarator. */
5581 declarator = make_ptrmem_declarator (cv_quals, type, declarator);
5583 declarator = make_pointer_declarator (cv_quals, declarator);
5585 declarator = make_reference_declarator (cv_quals, declarator);
5587 return declarator;
5590 /* If the next token is a `[', there is a direct-new-declarator. */
5597 /* Parse a direct-new-declarator.
5599 direct-new-declarator:
5601 direct-new-declarator [constant-expression]
5608 cp_declarator *declarator = NULL;
5617 if (!declarator)
5634 error ("expression in new-declarator must have integral "
5649 /* Add this bound to the declarator. */
5650 declarator = make_array_declarator (declarator, expression);
5658 return declarator;
6910 type-specifier-seq declarator = assignment-expression
6915 type-specifier-seq declarator asm-specification [opt]
6944 cp_declarator *declarator;
6947 /* Parse the declarator. */
6948 declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED,
6961 looks like a decl-specifier-seq and a declarator -- but then
6972 decl = start_decl (declarator, &type_specifiers,
6996 /* If we didn't even get past the declarator successfully, we are
7023 cp_declarator *declarator;
7040 declarator
7045 if (declarator == cp_error_declarator)
7079 decl = start_decl (declarator, &decl_specs,
7757 decl-specifier-seq [opt] init-declarator-list [opt] ;
7759 init-declarator-list:
7760 init-declarator
7761 init-declarator-list , init-declarator
7782 init-declarator-list is allowed to be empty.
7786 In a simple-declaration, the optional init-declarator-list can be
7842 /* If we are processing next declarator, coma is expected */
7850 /* Parse the init-declarator. */
8032 /* A constructor declarator cannot appear in a typedef. */
8073 decl-specifier; it is the beginning of the declarator. */
8128 the declarator. Therefore, once we see a type-specifier
8135 /* A constructor declarator cannot follow a type-specifier. */
8362 type-specifier-seq conversion-declarator [opt]
8371 cp_declarator *declarator;
8382 /* Parse the conversion-declarator. */
8383 declarator = cp_parser_conversion_declarator_opt (parser);
8385 type_specified = grokdeclarator (declarator, &type_specifiers, TYPENAME,
8392 /* Parse an (optional) conversion-declarator.
8394 conversion-declarator:
8395 ptr-operator conversion-declarator [opt]
8413 cp_declarator *declarator;
8415 /* Parse another optional declarator. */
8416 declarator = cp_parser_conversion_declarator_opt (parser);
8418 /* Create the representation of the declarator. */
8420 declarator = make_ptrmem_declarator (cv_quals, class_type,
8421 declarator);
8423 declarator = make_pointer_declarator (cv_quals, declarator);
8425 declarator = make_reference_declarator (cv_quals, declarator);
8427 return declarator;
8900 decl-specifier-seq [opt] init-declarator [opt] ;
9035 parm = grokdeclarator (parameter_declarator->declarator,
9886 template decl-specifier-seq [opt] declarator [opt] ;
9896 decl-specifier-seq [opt] declarator [opt] ;
9898 decl-specifier-seq [opt] declarator [opt] ; */
9933 and there's no declarator, then we have an explicit type
9949 cp_declarator *declarator;
9952 /* Parse the declarator. */
9953 declarator
9959 cp_parser_check_for_definition_in_return_type (declarator,
9961 if (declarator != cp_error_declarator)
9963 decl = grokdeclarator (declarator, &decl_specifiers,
9992 template <> decl-specifier [opt] init-declarator [opt] ;
11463 /* Parse an init-declarator.
11465 init-declarator:
11466 declarator initializer [opt]
11470 init-declarator:
11471 declarator asm-specification [opt] attributes [opt] initializer [opt]
11474 decl-specifier-seq [opt] declarator ctor-initializer [opt]
11476 decl-specifier-seq [opt] declarator function-try-block
11483 The DECL_SPECIFIERS apply to this declarator. Returns a
11485 this declarator appears in a class scope. The new DECL created by
11486 this declarator is returned.
11492 If FUNCTION_DEFINITION_ALLOWED_P then we handle the declarator and
11493 for a function-definition here as well. If the declarator is a
11494 declarator for a function-definition, *FUNCTION_DEFINITION_P will
11511 cp_declarator *declarator;
11533 /* Assume that this is not the declarator for a function
11538 /* Defer access checks while parsing the declarator; we cannot know
11543 /* Parse the declarator. */
11544 declarator
11554 if (declarator == cp_error_declarator)
11558 if (!cp_parser_check_declarator_template_parameters (parser, declarator))
11562 cp_parser_check_for_definition_in_return_type (declarator,
11568 scope = get_scope_of_declarator (declarator);
11614 declarator,
11619 (parser, decl_specifiers, prefix_attributes, declarator));
11649 /* If the init-declarator isn't initialized and isn't followed by a
11650 `,' or `;', it's not a valid init-declarator. */
11667 sure this was intended to be a declarator. Then continue
11687 decl = start_decl (declarator, decl_specifiers,
11714 /* Perform the access control checks for the declarator and the
11729 if (function_declarator_p (declarator))
11770 decl = grokfield (declarator, decl_specifiers,
11829 /* Parse a declarator.
11831 declarator:
11832 direct-declarator
11833 ptr-operator declarator
11835 abstract-declarator:
11836 ptr-operator abstract-declarator [opt]
11837 direct-abstract-declarator
11841 declarator:
11842 attributes [opt] direct-declarator
11843 attributes [opt] ptr-operator declarator
11845 abstract-declarator:
11846 attributes [opt] ptr-operator abstract-declarator [opt]
11847 attributes [opt] direct-abstract-declarator
11850 block-declarator:
11851 attributes [opt] ptr-operator block-declarator [opt]
11852 attributes [opt] direct-block-declarator
11857 to -1 if the declarator is a name, and +1 if it is a
11870 the declarator is a direct-declarator of the form "(...)".
11872 MEMBER_P is true iff this declarator is a member-declarator. */
11882 cp_declarator *declarator;
11930 /* If a ptr-operator was found, then this declarator was not
11934 /* The dependent declarator is optional if we are parsing an
11935 abstract-declarator. */
11939 /* Parse the dependent declarator. */
11940 declarator = cp_parser_declarator (parser, dcl_kind,
11945 /* If we are parsing an abstract-declarator, we must handle the
11946 case where the dependent declarator is absent. */
11949 declarator = NULL;
11953 declarator = make_ptrmem_declarator (cv_quals,
11955 declarator);
11957 declarator = make_pointer_declarator (cv_quals, declarator);
11959 declarator = make_reference_declarator (cv_quals, declarator);
11961 /* Everything else is a direct-declarator. */
11967 declarator = cp_parser_direct_declarator (parser, dcl_kind,
11972 if (attributes && declarator && declarator != cp_error_declarator)
11973 declarator->attributes = attributes;
11975 return declarator;
11978 /* Parse a direct-declarator or direct-abstract-declarator.
11980 direct-declarator:
11981 declarator-id
11982 direct-declarator ( parameter-declaration-clause )
11985 direct-declarator [ constant-expression [opt] ]
11986 ( declarator )
11988 direct-abstract-declarator:
11989 direct-abstract-declarator [opt]
11993 direct-abstract-declarator [opt] [ constant-expression [opt] ]
11994 ( abstract-declarator )
11999 direct-block-declarator:
12000 direct-block-declarator [opt]
12003 direct-block-declarator [opt] [ constant-expression [opt] ]
12004 ( block-declarator )
12007 Returns a representation of the declarator. DCL_KIND is
12009 direct-abstract-declarator. It is CP_PARSER_DECLARATOR_NAMED, if
12010 we are parsing a direct-declarator. It is
12012 of ambiguity we prefer an abstract declarator, as per
12023 cp_declarator *declarator = NULL;
12037 parenthesized declarator. When we know we are parsing a
12038 named declarator, it must be a parenthesized declarator
12041 direct-abstract-declarator. But `((*))', is a
12042 parenthesized abstract declarator. Finally, when T is a
12045 named declarator.
12048 and then try a nested declarator (if FIRST is true).
12079 /* In a member-declarator, the only valid interpretation
12092 /* If this is going to be an abstract declarator, we're
12093 in a declarator and we can't have default args. */
12137 /* Create the function-declarator. */
12138 declarator = make_call_declarator (declarator,
12153 declarator. */
12163 /* Parse the nested declarator. */
12166 declarator
12174 declarator = cp_error_declarator;
12175 if (declarator == cp_error_declarator)
12187 /* Parse an array-declarator. */
12226 declarator = cp_error_declarator;
12230 declarator = make_array_declarator (declarator, bounds);
12242 /* Parse a declarator-id */
12267 declarator = cp_error_declarator;
12295 /* If that failed, the declarator is invalid. */
12328 declarator = cp_error_declarator;
12336 /* We do not attempt to print the declarator
12340 cp_parser_error (parser, "invalid declarator");
12341 declarator = cp_error_declarator;
12367 declarator = make_id_declarator (qualifying_scope,
12370 declarator->id_loc = token->location;
12373 scope = get_scope_of_declarator (declarator);
12375 /* Any names that appear after the declarator-id for a
12380 || (declarator && declarator->kind == cdk_id))
12394 /* For an abstract declarator, we might wind up with nothing at this
12395 point. That's an error; the declarator is not optional. */
12397 if (!declarator && dcl_kind != CP_PARSER_DECLARATOR_BLOCK)
12398 cp_parser_error (parser, "expected declarator");
12407 return declarator;
12573 /* Parse a declarator-id.
12575 declarator-id:
12618 type-specifier-seq abstract-declarator [opt]
12634 /* There might or might not be an abstract declarator. */
12636 /* Look for the declarator. */
12641 /* Check to see if there really was a declarator. */
12714 type-specifier-seq declarator = assignment-expression
12721 we should treat the "S" as a declarator, not as a
12935 decl-specifier-seq declarator
12936 decl-specifier-seq declarator = assignment-expression
12937 decl-specifier-seq abstract-declarator [opt]
12938 decl-specifier-seq abstract-declarator [opt] = assignment-expression
12947 true iff the declarator is of the form "(p)". */
12957 cp_declarator *declarator;
12993 is no declarator. */
13000 declarator = NULL;
13004 /* Otherwise, there should be a declarator. */
13026 /* Parse the declarator. */
13027 declarator = cp_parser_declarator (parser,
13033 /* After the declarator, allow more attributes. */
13193 declarator,
13987 A declarator-id shall not be qualified exception of the
14215 decl-specifier-seq [opt] member-declarator-list [opt] ;
14221 member-declarator-list:
14222 member-declarator
14223 member-declarator-list , member-declarator
14225 member-declarator:
14226 declarator pure-specifier [opt]
14227 declarator constant-initializer [opt]
14235 member-declarator:
14236 declarator attributes [opt] pure-specifier [opt]
14237 declarator attributes [opt] constant-initializer [opt]
14315 /* If there is no declarator, then the decl-specifier-seq should
14452 cp_declarator *declarator;
14457 /* Parse the declarator. */
14458 declarator
14464 /* If something went wrong parsing the declarator, make sure
14466 if (declarator == cp_error_declarator)
14483 (declarator, decl_specifiers.type);
14509 A member-declarator can contain a constant-initializer
14517 if (function_declarator_p (declarator))
14529 member-declarator. Calling `grokfield' has
14531 that we are looking at a member-declarator. */
14544 declarator,
14558 decl = grokfield (declarator, &decl_specifiers,
14571 now; we will be starting fresh with the next declarator. */
15049 type-specifier-seq declarator
15050 type-specifier-seq abstract-declarator
15061 cp_declarator *declarator;
15080 /* If it's a `)', then there is no declarator. */
15082 declarator = NULL;
15084 declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_EITHER,
15095 return grokdeclarator (declarator, &type_specifiers, CATCHPARM, 1, NULL);
15429 __label__ label-declarator-seq ;
15431 label-declarator-seq:
15432 identifier , label-declarator-seq
15765 declarator, issue an error message. Returns TRUE if all went well,
15770 cp_declarator *declarator)
15777 switch (declarator->kind)
15780 if (declarator->u.id.qualifying_scope)
15785 scope = declarator->u.id.qualifying_scope;
15786 member = declarator->u.id.unqualified_name;
15813 else if (TREE_CODE (declarator->u.id.unqualified_name)
15830 (parser, declarator->declarator));
15912 constructor declarator. If FRIEND_P is true, the declarator is
15923 /* The common case is that this is not a constructor declarator, so
15928 /* And only certain tokens can begin a constructor declarator. */
15939 /* Assume that we are looking at a constructor declarator. */
15959 /* If we still think that this might be a constructor-declarator,
16072 const cp_declarator *declarator)
16078 success_p = start_function (decl_specifiers, declarator, attributes);
16114 declarator. INLINE_P is TRUE iff this function is an inline
16327 /* Parse a `decl-specifier-seq [opt] init-declarator [opt] ;' or
16353 /* Try the `decl-specifier-seq [opt] init-declarator [opt]'
16407 In that case, there's no need to warn about a missing declarator. */
16480 cp_declarator *declarator,
16488 fn = start_method (decl_specifiers, declarator, attributes);
16888 /* If the current declaration has no declarator, return true. */
16894 declarator. */
18110 parm = grokdeclarator (parmdecl->declarator,
18298 cp_declarator *declarator = NULL;
18311 declarator = make_id_declarator (NULL_TREE,
18325 /* Parse the declarator. */
18326 declarator
18344 decl = grokbitfield (declarator, &declspecs, width);
18348 decl = grokfield (declarator, &declspecs,
19677 type-specifier-seq block-declarator
19685 cp_declarator *declarator;
19693 /* Look for the block-declarator. */
19694 declarator
19699 return grokblockdecl (&type_specifier_seq, declarator);
20277 ret->declarator = itarget;
21228 cp_declarator *declarator;
21230 declarator = cp_parser_declarator (parser,
21243 decl = start_decl (declarator, &type_specifiers,