osprey/kg++fe/gnu/cp/pt.c File Reference

#include "config.h"
#include "system.h"
#include "obstack.h"
#include "tree.h"
#include "flags.h"
#include "cp-tree.h"
#include "tree-inline.h"
#include "decl.h"
#include "parse.h"
#include "lex.h"
#include "output.h"
#include "except.h"
#include "toplev.h"
#include "rtl.h"
#include "ggc.h"
#include "timevar.h"
#include "gt-cp-pt.h"

Include dependency graph for pt.c:

Go to the source code of this file.

Data Types

type  template_parm_data
type  pair_fn_data

Defines

#define UNIFY_ALLOW_NONE   0
#define UNIFY_ALLOW_MORE_CV_QUAL   1
#define UNIFY_ALLOW_LESS_CV_QUAL   2
#define UNIFY_ALLOW_DERIVED   4
#define UNIFY_ALLOW_INTEGER   8
#define UNIFY_ALLOW_OUTER_LEVEL   16
#define UNIFY_ALLOW_OUTER_MORE_CV_QUAL   32
#define UNIFY_ALLOW_OUTER_LESS_CV_QUAL   64
#define UNIFY_ALLOW_MAX_CORRECTION   128
#define GTB_VIA_VIRTUAL   1
#define GTB_IGNORE_TYPE   2
#define ccat(C)   obstack_1grow (&scratch_obstack, (C));
#define cat(S)   obstack_grow (&scratch_obstack, (S), strlen (S))

Typedefs

typedef int tree_fn_t PARAMS ((tree, void *))

Functions/Subroutines

static GTY (())
void push_access_scope (tree t)
void pop_access_scope (tree t)
tree finish_member_template_decl (tree decl)
static int template_class_depth_real (tree type, int count_specializations)
int template_class_depth (tree type)
static int inline_needs_template_parms (tree decl)
static void push_inline_template_parms_recursive (tree parmlist, int levels)
void maybe_begin_member_template_processing (tree decl)
void maybe_end_member_template_processing ()
int is_member_template (tree t)
static tree add_to_template_args (tree args, tree extra_args)
static tree add_outermost_template_args (tree args, tree extra_args)
tree get_innermost_template_args (tree args, int n)
void begin_template_parm_list ()
static void check_specialization_scope ()
void begin_specialization ()
void end_specialization ()
void reset_specialization ()
static void note_template_header (int specialization)
void begin_explicit_instantiation ()
void end_explicit_instantiation ()
void maybe_process_partial_specialization (tree type)
static tree retrieve_specialization (tree tmpl, tree args)
static tree retrieve_local_specialization (tree tmpl)
int is_specialization_of (tree decl, tree tmpl)
static tree register_specialization (tree spec, tree tmpl, tree args)
static int reregister_specialization (tree spec, tree tmpl, tree new_spec)
static void register_local_specialization (tree spec, tree tmpl)
void print_candidates (tree fns)
static tree determine_specialization (tree template_id, tree decl, tree *targs_out, int need_member_template)
static tree copy_default_args_to_explicit_spec_1 (tree spec_types, tree tmpl_types)
static void copy_default_args_to_explicit_spec (tree decl)
tree check_explicit_specialization (tree declarator, tree decl, int template_count, int flags)
void maybe_check_template_type (tree type)
int comp_template_parms (tree parms1, tree parms2)
void check_template_shadow (tree decl)
static tree build_template_parm_index (int index, int level, int orig_level, tree decl, tree type)
static tree reduce_template_parm_level (tree index, tree type, int levels)
tree process_template_parm (tree list, tree next)
tree end_template_parm_list (tree parms)
void end_template_decl ()
tree current_template_args ()
static tree build_template_decl (tree decl, tree parms)
static int mark_template_parm (tree t, void *data)
static tree process_partial_specialization (tree decl)
static void check_default_tmpl_args (tree decl, tree parms, int is_primary, int is_partial)
static int template_parm_this_level_p (tree t, void *data)
tree push_template_decl_real (tree decl, int is_friend)
tree push_template_decl (tree decl)
void redeclare_class_template (tree type, tree parms)
static tree convert_nontype_argument (tree type, tree expr)
static int coerce_template_template_parms (tree parm_parms, tree arg_parms, tsubst_flags_t complain, tree in_decl, tree outer_args)
static tree convert_template_argument (tree parm, tree arg, tree args, tsubst_flags_t complain, int i, tree in_decl)
static tree coerce_template_parms (tree parms, tree args, tree in_decl, tsubst_flags_t complain, int require_all_arguments)
static int template_args_equal (tree ot, tree nt)
int comp_template_args (tree oldargs, tree newargs)
static char * mangle_class_name_for_template (char *name, tree parms, tree arglist) const
static tree classtype_mangled_name (tree t)
static void add_pending_template (tree d)
tree lookup_template_function (tree fns, tree arglist)
static tree maybe_get_template_decl_from_type_decl (tree decl)
tree lookup_template_class (tree d1, tree arglist, tree in_decl, tree context, int entering_scope, tsubst_flags_t complain)
static tree for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d)
static int for_each_template_parm (tree t, tree_fn_t fn, void *data, htab_t visited)
int uses_template_parms (tree t)
int push_tinst_level (tree d)
void pop_tinst_level ()
static void reopen_tinst_level (tree level)
tree tinst_for_decl ()
static tree tsubst_friend_function (tree decl, tree args)
static tree tsubst_friend_class (tree friend_tmpl, tree args)
static int can_complete_type_without_circularity (tree type)
tree instantiate_class_template (tree type)
static int list_eq (tree t1, tree t2)
static tree maybe_fold_nontype_arg (tree arg)
static tree tsubst_template_arg_vector (tree t, tree args, tsubst_flags_t complain)
static tree tsubst_template_parms (tree parms, tree args, tsubst_flags_t complain)
static tree tsubst_aggr_type (tree t, tree args, tsubst_flags_t complain, tree in_decl, int entering_scope)
tree tsubst_default_argument (tree fn, tree type, tree arg)
static void tsubst_default_arguments (tree fn)
static tree tsubst_decl (tree t, tree args, tree type, tsubst_flags_t complain)
static tree tsubst_arg_types (tree arg_types, tree args, tsubst_flags_t complain, tree in_decl)
static tree tsubst_function_type (tree t, tree args, tsubst_flags_t complain, tree in_decl)
static tree tsubst_call_declarator_parms (tree parms, tree args, tsubst_flags_t complain, tree in_decl)
tree tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
tree tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
tree tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
tree instantiate_template (tree tmpl, tree targ_ptr)
int fn_type_unification (tree fn, tree explicit_targs, tree targs, tree args, tree return_type, unification_kind_t strict, int len)
static int maybe_adjust_types_for_deduction (unification_kind_t strict, tree *parm, tree *arg)
static int type_unification_real (tree tparms, tree targs, tree xparms, tree xargs, int subr, unification_kind_t strict, int allow_incomplete, int xlen)
static int resolve_overloaded_unification (tree tparms, tree targs, tree parm, tree arg, unification_kind_t strict, int sub_strict)
static int try_one_overload (tree tparms, tree orig_targs, tree targs, tree parm, tree arg, unification_kind_t strict, int sub_strict, bool addr_p)
static int verify_class_unification (tree targs, tree parms, tree args)
static tree try_class_unification (tree tparms, tree targs, tree parm, tree arg)
static tree get_template_base_recursive (tree tparms, tree targs, tree parm, tree arg_binfo, tree rval, int flags)
static tree get_template_base (tree tparms, tree targs, tree parm, tree arg)
static int template_decl_level (tree decl)
static int check_cv_quals_for_unify (int strict, tree arg, tree parm)
static int unify (tree tparms, tree targs, tree parm, tree arg, int strict)
void mark_decl_instantiated (tree result, int extern_p)
int more_specialized (tree pat1, tree pat2, int deduce, int len)
int more_specialized_class (tree pat1, tree pat2, tree full_args)
static tree get_bindings_real (tree fn, tree decl, tree explicit_args, int check_rettype, int deduce, int len)
tree get_bindings (tree fn, tree decl, tree explicit_args)
static tree get_bindings_overload (tree fn, tree decl, tree explicit_args)
static tree get_class_bindings (tree tparms, tree parms, tree args)
tree most_specialized_instantiation (tree instantiations)
static tree most_specialized (tree fns, tree decl, tree explicit_args)
tree most_general_template (tree decl)
static tree most_specialized_class (tree tmpl, tree args)
void do_decl_instantiation (tree decl, tree storage)
void mark_class_instantiated (tree t, int extern_p)
static void bt_instantiate_type_proc (binding_entry entry, void *data)
void do_type_instantiation (tree t, tree storage, tsubst_flags_t complain)
static void regenerate_decl_from_template (tree decl, tree tmpl)
tree instantiate_decl (tree d, int defer_ok)
int instantiate_pending_templates ()
static tree tsubst_initializer_list (tree t, tree argvec)
static void set_current_access_from_decl (tree decl)
static void tsubst_enum (tree tag, tree newtag, tree args)
tree get_mostly_instantiated_function_type (tree decl)
int problematic_instantiation_changed ()
void record_last_problematic_instantiation ()
tree current_instantiation ()
static int invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)

Variables

static int tinst_depth
int max_tinst_depth
static int tinst_level_tick
static int last_template_error_tick


Define Documentation

#define cat ( S   )     obstack_grow (&scratch_obstack, (S), strlen (S))

#define ccat (  )     obstack_1grow (&scratch_obstack, (C));

#define GTB_IGNORE_TYPE   2

#define GTB_VIA_VIRTUAL   1

#define UNIFY_ALLOW_DERIVED   4

Referenced by type_unification_real(), and unify().

#define UNIFY_ALLOW_INTEGER   8

Referenced by unify().

#define UNIFY_ALLOW_LESS_CV_QUAL   2

#define UNIFY_ALLOW_MAX_CORRECTION   128

Referenced by unify().

#define UNIFY_ALLOW_MORE_CV_QUAL   1

#define UNIFY_ALLOW_NONE   0

#define UNIFY_ALLOW_OUTER_LESS_CV_QUAL   64

Referenced by check_cv_quals_for_unify(), and unify().

#define UNIFY_ALLOW_OUTER_LEVEL   16

Referenced by type_unification_real(), and unify().

#define UNIFY_ALLOW_OUTER_MORE_CV_QUAL   32


Typedef Documentation

typedef int tree_fn_t PARAMS((tree, void *))

Definition at line 53 of file pt.c.


Function Documentation

static tree add_outermost_template_args ( tree  args,
tree  extra_args 
) [static]

static void add_pending_template ( tree  d  )  [static]

static tree add_to_template_args ( tree  args,
tree  extra_args 
) [static]

void begin_explicit_instantiation ( void   ) 

Definition at line 759 of file pt.c.

Referenced by cp_parser_explicit_instantiation().

void begin_specialization ( void   ) 

void begin_template_parm_list ( void   ) 

static void bt_instantiate_type_proc ( binding_entry  entry,
void data 
) [static]

static tree build_template_decl ( tree  decl,
tree  parms 
) [static]

static tree build_template_parm_index ( int  index,
int  level,
int  orig_level,
tree  decl,
tree  type 
) [static]

static int can_complete_type_without_circularity ( tree  type  )  [static]

static int check_cv_quals_for_unify ( int  strict,
tree  arg,
tree  parm 
) [static]

static void check_default_tmpl_args ( tree  decl,
tree  parms,
int  is_primary,
int  is_partial 
) [static]

tree check_explicit_specialization ( tree  declarator,
tree  decl,
int  template_count,
int  flags 
)

Definition at line 1492 of file pt.c.

Referenced by grokdeclarator(), and grokfndecl().

static void check_specialization_scope ( void   )  [static]

Definition at line 686 of file pt.c.

References current_scope(), current_template_parms, error(), and TREE_CODE.

Referenced by begin_specialization().

void check_template_shadow ( tree  decl  ) 

Definition at line 1979 of file pt.c.

Referenced by push_class_level_binding(), pushdecl(), pushdecl_maybe_friend(), and start_method().

static tree classtype_mangled_name ( tree  t  )  [static]

static tree coerce_template_parms ( tree  parms,
tree  args,
tree  in_decl,
tsubst_flags_t  complain,
int  require_all_arguments 
) [static]

static int coerce_template_template_parms ( tree  parm_parms,
tree  arg_parms,
tsubst_flags_t  complain,
tree  in_decl,
tree  outer_args 
) [static]

int comp_template_args ( tree  oldargs,
tree  newargs 
)

int comp_template_parms ( tree  parms1,
tree  parms2 
)

static tree convert_nontype_argument ( tree  type,
tree  expr 
) [static]

static tree convert_template_argument ( tree  parm,
tree  arg,
tree  args,
tsubst_flags_t  complain,
int  i,
tree  in_decl 
) [static]

static void copy_default_args_to_explicit_spec ( tree  decl  )  [static]

static tree copy_default_args_to_explicit_spec_1 ( tree  spec_types,
tree  tmpl_types 
) [static]

tree current_instantiation ( void   ) 

tree current_template_args ( void   ) 

static tree determine_specialization ( tree  template_id,
tree  decl,
tree targs_out,
int  need_member_template 
) [static]

void do_decl_instantiation ( tree  decl,
tree  storage 
)

Definition at line 9864 of file pt.c.

void do_type_instantiation ( tree  t,
tree  storage,
tsubst_flags_t  complain 
)

Definition at line 10007 of file pt.c.

Referenced by bt_instantiate_type_proc(), and cp_parser_explicit_instantiation().

void end_explicit_instantiation ( void   ) 

Definition at line 766 of file pt.c.

Referenced by cp_parser_explicit_instantiation().

void end_specialization ( void   ) 

void end_template_decl ( void   ) 

Definition at line 2198 of file pt.c.

Referenced by finish_template_decl(), and finish_template_template_parm().

tree end_template_parm_list ( tree  parms  ) 

tree finish_member_template_decl ( tree  decl  ) 

int fn_type_unification ( tree  fn,
tree  explicit_targs,
tree  targs,
tree  args,
tree  return_type,
unification_kind_t  strict,
int  len 
)

static int for_each_template_parm ( tree  t,
tree_fn_t  fn,
void data,
htab_t  visited 
) [static]

static tree for_each_template_parm_r ( tree tp,
int *  walk_subtrees,
void d 
) [static]

tree get_bindings ( tree  fn,
tree  decl,
tree  explicit_args 
)

static tree get_bindings_overload ( tree  fn,
tree  decl,
tree  explicit_args 
) [static]

Definition at line 9631 of file pt.c.

References DEDUCE_EXACT, and get_bindings_real().

Referenced by resolve_overloaded_unification().

static tree get_bindings_real ( tree  fn,
tree  decl,
tree  explicit_args,
int  check_rettype,
int  deduce,
int  len 
) [static]

static tree get_class_bindings ( tree  tparms,
tree  parms,
tree  args 
) [static]

tree get_innermost_template_args ( tree  args,
int  n 
)

Definition at line 626 of file pt.c.

Referenced by instantiate_decl(), regenerate_decl_from_template(), and tsubst_decl().

tree get_mostly_instantiated_function_type ( tree  decl  ) 

Definition at line 10769 of file pt.c.

Referenced by write_encoding(), and write_unqualified_name().

static tree get_template_base ( tree  tparms,
tree  targs,
tree  parm,
tree  arg 
) [static]

static tree get_template_base_recursive ( tree  tparms,
tree  targs,
tree  parm,
tree  arg_binfo,
tree  rval,
int  flags 
) [static]

static GTY ( ()   )  [static]

Definition at line 62 of file pt.c.

References processing_template_parmlist.

static int inline_needs_template_parms ( tree  decl  )  [static]

tree instantiate_class_template ( tree  type  ) 

Definition at line 5202 of file pt.c.

Referenced by build_new_op(), complete_type(), instantiate_pending_templates(), and prep_operand().

tree instantiate_decl ( tree  d,
int  defer_ok 
)

Definition at line 10245 of file pt.c.

References abort, add_pending_template(), at_eof, cp_finish_decl(), DECL_ARGUMENTS, DECL_CLONED_FUNCTION, DECL_CLONED_FUNCTION_P, DECL_EXPLICIT_INSTANTIATION, DECL_EXTERNAL, DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION, DECL_IN_AGGR_P, DECL_INITIAL, DECL_INITIALIZED_IN_CLASS_P, DECL_INLINE, DECL_INTERFACE_KNOWN, DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, DECL_NAMESPACE_SCOPE_P, DECL_NOT_REALLY_EXTERN, DECL_SAVED_TREE, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_TEMPLATE_INFO, DECL_TEMPLATE_INSTANTIATED, DECL_TEMPLATE_INSTANTIATION, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_SPECIALIZATION, DECL_TI_ARGS, DECL_TI_TEMPLATE, expand_body(), finish_function(), flag_alt_external_templates, flag_external_templates, get_innermost_template_args(), global_bindings_p(), htab_create(), htab_delete(), htab_eq_pointer, htab_hash_pointer, import_export_decl(), input_filename, interface_unknown, lineno, most_general_template(), my_friendly_assert, NULL, NULL_RTX, NULL_TREE, out, pedwarn(), pop_access_scope(), pop_from_top_level(), pop_tinst_level(), push_access_scope(), push_tinst_level(), push_to_top_level(), regenerate_decl_from_template(), repo_template_used(), retrieve_specialization(), SET_DECL_RTL, SF_PRE_PARSED, start_function(), tf_error, tf_warning, TI_PENDING_TEMPLATE_FLAG, timevar_pop, timevar_push, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, TREE_TYPE, tsubst(), tsubst_expr(), TYPE_RAISES_EXCEPTIONS, and warn_if_unknown_interface().

Referenced by cp_cannot_inline_tree_fn(), do_decl_instantiation(), do_type_instantiation(), instantiate_class_member(), instantiate_decl(), instantiate_decls(), instantiate_decls_1(), instantiate_expr(), instantiate_pending_templates(), and mark_used().

int instantiate_pending_templates (  ) 

tree instantiate_template ( tree  tmpl,
tree  targ_ptr 
)

static int invalid_nontype_parm_type_p ( tree  type,
tsubst_flags_t  complain 
) [static]

int is_member_template ( tree  t  ) 

int is_specialization_of ( tree  decl,
tree  tmpl 
)

Definition at line 915 of file pt.c.

Referenced by is_friend(), and is_specialization_of_friend().

static int list_eq ( tree  t1,
tree  t2 
) [static]

Definition at line 5656 of file pt.c.

References NULL_TREE, TREE_CHAIN, TREE_VALUE, and TYPE_MAIN_VARIANT.

Referenced by list_eq().

tree lookup_template_class ( tree  d1,
tree  arglist,
tree  in_decl,
tree  context,
int  entering_scope,
tsubst_flags_t  complain 
)

tree lookup_template_function ( tree  fns,
tree  arglist 
)

static char* mangle_class_name_for_template ( char *  name,
tree  parms,
tree  arglist 
) const [static]

void mark_class_instantiated ( tree  t,
int  extern_p 
)

Definition at line 9974 of file pt.c.

Referenced by do_type_instantiation(), and repo_template_used().

void mark_decl_instantiated ( tree  result,
int  extern_p 
)

static int mark_template_parm ( tree  t,
void data 
) [static]

static int maybe_adjust_types_for_deduction ( unification_kind_t  strict,
tree parm,
tree arg 
) [static]

void maybe_begin_member_template_processing ( tree  decl  ) 

void maybe_check_template_type ( tree  type  ) 

Definition at line 1882 of file pt.c.

References error(), template_class_depth_real(), and TYPE_CONTEXT.

Referenced by maybe_process_template_type_declaration().

void maybe_end_member_template_processing ( void   ) 

static tree maybe_fold_nontype_arg ( tree  arg  )  [static]

static tree maybe_get_template_decl_from_type_decl ( tree  decl  )  [static]

void maybe_process_partial_specialization ( tree  type  ) 

int more_specialized ( tree  pat1,
tree  pat2,
int  deduce,
int  len 
)

Definition at line 9507 of file pt.c.

References DECL_TEMPLATE_RESULT, get_bindings_real(), NULL_TREE, and winner.

Referenced by joust(), and most_specialized_instantiation().

int more_specialized_class ( tree  pat1,
tree  pat2,
tree  full_args 
)

Definition at line 9538 of file pt.c.

Referenced by most_specialized_class().

tree most_general_template ( tree  decl  ) 

static tree most_specialized ( tree  fns,
tree  decl,
tree  explicit_args 
) [static]

static tree most_specialized_class ( tree  tmpl,
tree  args 
) [static]

tree most_specialized_instantiation ( tree  instantiations  ) 

static void note_template_header ( int  specialization  )  [static]

Definition at line 749 of file pt.c.

References processing_specialization.

Referenced by begin_specialization(), and begin_template_parm_list().

void pop_access_scope ( tree  t  ) 

void pop_tinst_level ( void   ) 

void print_candidates ( tree  fns  ) 

int problematic_instantiation_changed ( void   ) 

Definition at line 10834 of file pt.c.

Referenced by maybe_print_instantiation_context().

static tree process_partial_specialization ( tree  decl  )  [static]

tree process_template_parm ( tree  list,
tree  next 
)

void push_access_scope ( tree  t  ) 

static void push_inline_template_parms_recursive ( tree  parmlist,
int  levels 
) [static]

tree push_template_decl ( tree  decl  ) 

tree push_template_decl_real ( tree  decl,
int  is_friend 
)

Definition at line 2699 of file pt.c.

Referenced by do_friend(), maybe_process_template_type_declaration(), and push_template_decl().

int push_tinst_level ( tree  d  ) 

void record_last_problematic_instantiation ( void   ) 

Definition at line 10841 of file pt.c.

Referenced by maybe_print_instantiation_context().

void redeclare_class_template ( tree  type,
tree  parms 
)

Definition at line 2969 of file pt.c.

Referenced by push_template_decl_real(), tsubst_friend_class(), and xref_tag().

static tree reduce_template_parm_level ( tree  index,
tree  type,
int  levels 
) [static]

static void regenerate_decl_from_template ( tree  decl,
tree  tmpl 
) [static]

static void register_local_specialization ( tree  spec,
tree  tmpl 
) [static]

Definition at line 1080 of file pt.c.

References htab_find_slot(), and INSERT.

Referenced by instantiate_decl(), and tsubst_decl().

static tree register_specialization ( tree  spec,
tree  tmpl,
tree  args 
) [static]

static void reopen_tinst_level ( tree  level  )  [static]

Definition at line 4833 of file pt.c.

References pop_tinst_level(), and TREE_CHAIN.

Referenced by instantiate_pending_templates().

static int reregister_specialization ( tree  spec,
tree  tmpl,
tree  new_spec 
) [static]

void reset_specialization ( void   ) 

static int resolve_overloaded_unification ( tree  tparms,
tree  targs,
tree  parm,
tree  arg,
unification_kind_t  strict,
int  sub_strict 
) [static]

static tree retrieve_local_specialization ( tree  tmpl  )  [static]

Definition at line 906 of file pt.c.

References htab_find().

Referenced by tsubst_copy(), and tsubst_decl().

static tree retrieve_specialization ( tree  tmpl,
tree  args 
) [static]

static void set_current_access_from_decl ( tree  decl  )  [static]

static int template_args_equal ( tree  ot,
tree  nt 
) [static]

Definition at line 3800 of file pt.c.

References comp_template_args(), cp_tree_equal(), same_type_p, TREE_CODE, and TYPE_P.

Referenced by comp_template_args(), try_one_overload(), and unify().

int template_class_depth ( tree  type  ) 

static int template_class_depth_real ( tree  type,
int  count_specializations 
) [static]

static int template_decl_level ( tree  decl  )  [static]

Definition at line 8853 of file pt.c.

References abort, DECL_INITIAL, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_LEVEL, TREE_CODE, and TREE_TYPE.

Referenced by unify().

static int template_parm_this_level_p ( tree  t,
void data 
) [static]

tree tinst_for_decl (  ) 

Definition at line 4850 of file pt.c.

References p, and TREE_CHAIN.

Referenced by extract_interface_info(), and warn_if_unknown_interface().

static tree try_class_unification ( tree  tparms,
tree  targs,
tree  parm,
tree  arg 
) [static]

static int try_one_overload ( tree  tparms,
tree  orig_targs,
tree  targs,
tree  parm,
tree  arg,
unification_kind_t  strict,
int  sub_strict,
bool  addr_p 
) [static]

tree tsubst ( tree  t,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
)

Definition at line 6607 of file pt.c.

References abort, add_exception_specifier(), BINFO_BASETYPES, BINFO_TYPE, BINFO_VIRTUALS, BINFO_VTABLE, build(), build_cplus_array_type(), build_cplus_method_type(), build_exception_variant(), build_min(), build_nt(), build_offset_type(), build_pointer_type(), build_ptrmemfunc_type(), build_reference_type(), CALL_DECLARATOR_EXCEPTION_SPEC, CALL_DECLARATOR_PARMS, CALL_DECLARATOR_QUALS, char_type_node, complete_type(), COMPLETE_TYPE_P, COMPLEX_TYPE, compute_array_index_type(), copy_node, copy_type, cp_build_qualified_type_real(), cp_type_quals(), current_function_decl, cxx_incomplete_type_error, decl_constant_value(), DECL_CONTEXT, DECL_P, error(), error_mark_node, f, fold(), hash_tree_cons(), IDENTIFIER_TYPE_VALUE, idx, input_filename, INT_CST_LT, integer_one_node, integer_type_node, integer_zero_node, integer_zerop(), IS_AGGR_TYPE, layout_type(), lineno, lookup_template_class(), make_call_declarator(), make_node, make_pointer_declarator(), make_reference_declarator(), make_typename_type(), make_unbound_class_template(), max, maybe_fold_nontype_arg(), my_friendly_assert, NULL_TREE, pedantic, pedwarn(), processing_template_decl, r, reduce_template_parm_level(), result, size_zero_node, sizetype, sorry(), TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, template_substituted(), TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO, TEMPLATE_TYPE_DECL, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_LEVEL, TEMPLATE_TYPE_PARM_INDEX, tf_error, tf_ignore_bad_quals, tf_keep_type_decl, TMPL_ARG, TMPL_ARGS_DEPTH, TREE_CHAIN, TREE_CODE, tree_code_name, tree_cons, TREE_OPERAND, TREE_PARMLIST, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TREE_VEC_LENGTH, tsubst_aggr_type(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_decl(), tsubst_expr(), tsubst_function_type(), tsubst_template_arg_vector(), TYPE_ARG_TYPES, TYPE_BEING_DEFINED, TYPE_BINFO, TYPE_BINFO_BASETYPES, TYPE_BINFO_VIRTUALS, TYPE_BINFO_VTABLE, TYPE_CONTEXT, TYPE_DOMAIN, TYPE_FIELDS, TYPE_IDENTIFIER, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_NAME, TYPE_OFFSET_BASETYPE, TYPE_P, TYPE_POINTER_TO, TYPE_QUALS, TYPE_RAISES_EXCEPTIONS, TYPE_REFERENCE_TO, TYPE_STUB_DECL, TYPE_TI_ARGS, TYPE_TI_TEMPLATE, TYPENAME_TYPE_FULLNAME, unknown_type_node, uses_template_parms(), void_list_node, and void_type_node.

Referenced by coerce_template_parms(), coerce_template_template_parms(), convert_template_argument(), fn_type_unification(), get_bindings(), get_bindings_real(), get_class_bindings(), get_mostly_instantiated_function_type(), grokdeclarator(), grokoptypename(), instantiate_class_template(), instantiate_decl(), instantiate_template(), lookup_template_class(), regenerate_decl_from_template(), resolve_overloaded_unification(), tsubst(), tsubst_aggr_type(), tsubst_arg_types(), tsubst_baselink(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_copy_and_build(), tsubst_decl(), tsubst_exception_specification(), tsubst_expr(), tsubst_friend_class(), tsubst_friend_function(), tsubst_function_type(), tsubst_qualified_id(), tsubst_template_arg(), tsubst_template_parms(), unify(), and verify_class_unification().

static tree tsubst_aggr_type ( tree  t,
tree  args,
tsubst_flags_t  complain,
tree  in_decl,
int  entering_scope 
) [static]

static tree tsubst_arg_types ( tree  arg_types,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
) [static]

static tree tsubst_call_declarator_parms ( tree  parms,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
) [static]

tree tsubst_copy ( tree  t,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
)

static tree tsubst_decl ( tree  t,
tree  args,
tree  type,
tsubst_flags_t  complain 
) [static]

Definition at line 5933 of file pt.c.

References abort, build_tree_list, c_apply_type_quals_to_decl(), CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, clone_function_decl(), complete_type(), constructor_name(), copy_decl(), copy_node, CP_DECL_CONTEXT, cp_error_at(), cp_type_quals(), DECL_ARG_TYPE, DECL_ARGUMENTS, DECL_BEFRIENDING_CLASSES, DECL_CLASS_SCOPE_P, DECL_CLASS_TEMPLATE_P, DECL_CLONED_FUNCTION, DECL_CONSTRUCTOR_P, DECL_CONTEXT, DECL_CONV_FN_P, DECL_DEAD_FOR_LOCAL, DECL_DEFER_OUTPUT, DECL_DESTRUCTOR_P, DECL_EXTERNAL, DECL_FRIEND_P, DECL_INITIAL, DECL_INITIALIZED_P, DECL_INTERFACE_KNOWN, DECL_LANG_SPECIFIC, DECL_NAME, DECL_NAMESPACE_SCOPE_P, DECL_PENDING_INLINE_INFO, DECL_PENDING_INLINE_P, DECL_PRIMARY_TEMPLATE, DECL_RESULT, DECL_SAVED_TREE, DECL_SELF_REFERENCE_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_TEMPLATE_INFO, DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_PARM_P, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_SPECIALIZATION, DECL_TEMPLATE_SPECIALIZATIONS, DECL_TEMPLATE_TEMPLATE_PARM_P, DECL_TI_ARGS, DECL_TI_TEMPLATE, DECL_USE_TEMPLATE, error_mark_node, get_innermost_template_args(), grok_ctor_properties(), grok_op_properties(), IDENTIFIER_OPNAME_P, input_filename, layout_decl(), lineno, mangle_conv_op_name_for_type(), maybe_retrofit_in_chrg(), member(), most_general_template(), my_friendly_assert, NULL_RTX, NULL_TREE, PRIMARY_TEMPLATE_P, r, register_local_specialization(), register_specialization(), retrieve_local_specialization(), retrieve_specialization(), SET_DECL_ASSEMBLER_NAME, SET_DECL_IMPLICIT_INSTANTIATION, SET_DECL_RTL, SET_DECL_SELF_REFERENCE_P, SET_DECL_TEMPLATE_PARM_P, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, tree_cons, TREE_PUBLIC, TREE_STATIC, TREE_TYPE, TREE_USED, TREE_VALUE, tsubst(), tsubst_aggr_type(), tsubst_copy(), tsubst_default_arguments(), tsubst_expr(), tsubst_template_arg_vector(), tsubst_template_parms(), TYPE_MAIN_DECL, TYPE_NAME, TYPE_P, type_passed_as(), uses_template_parms(), and VOID_TYPE_P.

Referenced by tsubst().

tree tsubst_default_argument ( tree  fn,
tree  type,
tree  arg 
)

Definition at line 5866 of file pt.c.

Referenced by convert_default_arg(), and tsubst_default_arguments().

static void tsubst_default_arguments ( tree  fn  )  [static]

static void tsubst_enum ( tree  tag,
tree  newtag,
tree  args 
) [static]

tree tsubst_expr ( tree  t,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
)

Definition at line 7623 of file pt.c.

References abort, add_stmt(), ANON_AGGR_TYPE_P, ASM_CLOBBERS, ASM_CV_QUAL, ASM_INPUT_P, ASM_INPUTS, ASM_OUTPUTS, ASM_STRING, begin_compound_stmt(), begin_do_stmt(), begin_else_clause(), begin_for_stmt(), begin_function_body(), begin_function_try_block(), begin_handler(), begin_if_stmt(), begin_switch_stmt(), begin_try_block(), begin_while_stmt(), build_expr_from_tree(), build_nt(), CASE_HIGH, CASE_LABEL, CASE_LOW, CLEANUP_P, COMPOUND_BODY, COMPOUND_STMT_BODY_BLOCK, COMPOUND_STMT_NO_SCOPE, cp_finish_decl(), cp_fname_init(), current_function_decl, cxx_printable_name(), DECL_INITIAL, DECL_NAME, DECL_PRETTY_FUNCTION_P, DECL_STMT_DECL, DECL_TEMPLATE_INSTANTIATED, DO_BODY, DO_COND, do_local_using_decl(), do_using_directive(), ELSE_CLAUSE, error_mark_node, EXPR_STMT_EXPR, FILE_STMT_FILENAME, FILE_STMT_FILENAME_NODE, finish_anon_union(), finish_asm_stmt(), finish_break_stmt(), finish_case_label(), finish_cleanup(), finish_cleanup_try_block(), finish_compound_stmt(), finish_continue_stmt(), finish_do_body(), finish_do_stmt(), finish_else_clause(), finish_expr_stmt(), finish_for_cond(), finish_for_expr(), finish_for_init_stmt(), finish_for_stmt(), finish_function_body(), finish_function_handler_sequence(), finish_function_try_block(), finish_goto_stmt(), finish_handler(), finish_handler_parms(), finish_handler_sequence(), finish_if_stmt(), finish_if_stmt_cond(), finish_label_decl(), finish_label_stmt(), finish_mem_initializers(), finish_named_return_value(), finish_return_stmt(), finish_switch_cond(), finish_switch_stmt(), finish_then_clause(), finish_try_block(), finish_while_stmt(), finish_while_stmt_cond(), FN_TRY_BLOCK_P, FOR_BODY, FOR_COND, FOR_EXPR, FOR_INIT_STMT, GOTO_DESTINATION, HANDLER_BODY, HANDLER_PARMS, IF_COND, input_filename, LABEL_STMT_LABEL, lineno, maybe_push_decl(), NULL_TREE, prep_stmt(), processing_template_decl, RETURN_STMT_EXPR, statement_code_p, STMT_LINENO, SWITCH_BODY, SWITCH_COND, THEN_CLAUSE, tmp, TREE_ADDRESSABLE, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_TYPE, TRY_HANDLERS, TRY_STMTS, tsubst(), tsubst_copy(), tsubst_initializer_list(), USING_STMT_NAMESPACE, val, WHILE_BODY, and WHILE_COND.

Referenced by coerce_template_parms(), instantiate_class_template(), instantiate_decl(), regenerate_decl_from_template(), tsubst(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_copy_and_build(), tsubst_decl(), tsubst_default_argument(), tsubst_enum(), tsubst_expr(), tsubst_friend_function(), tsubst_initializer_list(), tsubst_omp_clauses(), tsubst_template_arg(), tsubst_template_arg_vector(), and tsubst_template_parms().

static tree tsubst_friend_class ( tree  friend_tmpl,
tree  args 
) [static]

static tree tsubst_friend_function ( tree  decl,
tree  args 
) [static]

static tree tsubst_function_type ( tree  t,
tree  args,
tsubst_flags_t  complain,
tree  in_decl 
) [static]

static tree tsubst_initializer_list ( tree  t,
tree  argvec 
) [static]

static tree tsubst_template_arg_vector ( tree  t,
tree  args,
tsubst_flags_t  complain 
) [static]

static tree tsubst_template_parms ( tree  parms,
tree  args,
tsubst_flags_t  complain 
) [static]

static int type_unification_real ( tree  tparms,
tree  targs,
tree  xparms,
tree  xargs,
int  subr,
unification_kind_t  strict,
int  allow_incomplete,
int  xlen 
) [static]

static int unify ( tree  tparms,
tree  targs,
tree  parm,
tree  arg,
int  strict 
) [static]

Definition at line 8946 of file pt.c.

References abort, build(), check_cv_quals_for_unify(), CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, coerce_template_parms(), COMPLEX_TYPE, cp_build_qualified_type_real(), cp_tree_equal(), CP_TYPE_CONST_P, cp_type_quals(), decl_constant_value(), DECL_INNERMOST_TEMPLATE_PARMS, DEDUCE_EXACT, error_mark_node, fold(), get_template_base(), i, idx, integer_one_node, integer_type_node, IS_EXPR_CODE_CLASS, NULL_TREE, offset, same_type_ignoring_top_level_qualifiers_p, same_type_p, sorry(), t1, t2, template_args_equal(), template_decl_level(), TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_LEVEL, tf_none, tparm(), TREE_CODE, TREE_CODE_CLASS, tree_code_name, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, try_class_unification(), tsubst(), TYPE_ARG_TYPES, TYPE_DOMAIN, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_OFFSET_BASETYPE, TYPE_P, TYPE_PTRMEMFUNC_FN_TYPE, TYPE_PTRMEMFUNC_P, TYPE_TI_ARGS, TYPE_TI_TEMPLATE, type_unification_real(), UNIFY_ALLOW_DERIVED, UNIFY_ALLOW_INTEGER, UNIFY_ALLOW_LESS_CV_QUAL, UNIFY_ALLOW_MAX_CORRECTION, UNIFY_ALLOW_MORE_CV_QUAL, UNIFY_ALLOW_NONE, UNIFY_ALLOW_OUTER_LESS_CV_QUAL, UNIFY_ALLOW_OUTER_LEVEL, UNIFY_ALLOW_OUTER_MORE_CV_QUAL, unknown_type_node, uses_template_parms(), and variably_modified_type_p().

Referenced by get_class_bindings(), more_specialized_fn(), try_class_unification(), try_one_overload(), type_unification_real(), and unify().

int uses_template_parms ( tree  t  ) 

static int verify_class_unification ( tree  targs,
tree  parms,
tree  args 
) [static]


Variable Documentation

Definition at line 4767 of file pt.c.

Definition at line 664 of file c-common.c.

int tinst_depth [static]

Definition at line 4761 of file pt.c.

int tinst_level_tick [static]

Definition at line 4766 of file pt.c.


Generated on Wed Apr 8 15:29:32 2009 for Open64 by  doxygen 1.5.6