contrib/gcc-4.7/gcc/cp/typeck.c
/* Given a type, perhaps copied for a typedef,
   find the "original" version of it.  */
Given a type, perhaps copied for a typedef,
find the "original" version of it.
Given a type perhaps copied for a typedef find the " original " version of it .
static tree
original_type (tree t)
{
  int quals = cp_type_quals (t);
  while (t != error_mark_node
	 && TYPE_NAME (t) != NULL_TREE)
    {
      tree x = TYPE_NAME (t);
      if (TREE_CODE (x) != TYPE_DECL)
	break;
      x = DECL_ORIGINAL_TYPE (x);
      if (x == NULL_TREE)
	break;
      t = x;
    }
  return cp_build_qualified_type (t, quals);
}
static tree original_type ( tree t ) { int quals = cp_type_quals ( t ) ; while ( t != error_mark_node && TYPE_NAME ( t ) != NULL_TREE ) { tree x = TYPE_NAME ( t ) ; if ( TREE_CODE ( x ) != TYPE_DECL ) break ; x = DECL_ORIGINAL_TYPE ( x ) ; if ( x == NULL_TREE ) break ; t = x ; } return cp_build_qualified_type ( t , quals ) ; }
Given a type, perhaps copied for a typedef,
find the "original" version of it.
Given a type perhaps copied for a typedef find the " original " version of it .