Factor out function/method printing code from generic_val_print
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index 84f3a338bf88483bb031942a694a4e6a2c1c0af1..3ea544d8efa3092863b719d20b579cfe1716ad31 100644 (file)
@@ -793,7 +793,7 @@ exp :       SIZEOF '(' type ')'     %prec UNARY
                                              (parse_language (pstate),
                                               parse_gdbarch (pstate),
                                               "int"));
-                         CHECK_TYPEDEF (type);
+                         type = check_typedef (type);
 
                            /* $5.3.3/2 of the C++ Standard (n3290 draft)
                               says of sizeof:  "When applied to a reference
@@ -985,7 +985,7 @@ variable:   block COLONCOLON name
 qualified_name:        TYPENAME COLONCOLON name
                        {
                          struct type *type = $1.type;
-                         CHECK_TYPEDEF (type);
+                         type = check_typedef (type);
                          if (!type_aggregate_p (type))
                            error (_("`%s' is not defined as an aggregate type."),
                                   TYPE_SAFE_NAME (type));
@@ -1001,7 +1001,7 @@ qualified_name:   TYPENAME COLONCOLON name
                          struct stoken tmp_token;
                          char *buf;
 
-                         CHECK_TYPEDEF (type);
+                         type = check_typedef (type);
                          if (!type_aggregate_p (type))
                            error (_("`%s' is not defined as an aggregate type."),
                                   TYPE_SAFE_NAME (type));
@@ -3004,7 +3004,8 @@ classify_inner_name (struct parser_state *par_state,
     return ERROR;
 
   copy = copy_name (yylval.ssym.stoken);
-  yylval.ssym.sym = cp_lookup_nested_symbol (type, copy, block);
+  /* N.B. We assume the symbol can only be in VAR_DOMAIN.  */
+  yylval.ssym.sym = cp_lookup_nested_symbol (type, copy, block, VAR_DOMAIN);
 
   /* If no symbol was found, search for a matching base class named
      COPY.  This will allow users to enter qualified names of class members
This page took 0.024827 seconds and 4 git commands to generate.