From d8228535f5e83861361a366e2298a4d8c79e78d8 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 6 May 2011 14:12:18 +0000 Subject: gdb/ * c-exp.y (qualified_name): Call destructor_name_p with $1.type. (classify_inner_name): Call cp_lookup_nested_type with yylval.tsym.type. * cp-namespace.c (cp_lookup_nested_type): New variable saved_parent_type. Call CHECK_TYPEDEF for parent_type. Call type_name_no_tag_or_error with saved_parent_type. * dwarf2read.c (load_partial_dies): Read in any children of DW_TAG_typedef with complaint in such case. * gdbtypes.c (type_name_no_tag_or_error): New function. * gdbtypes.h (type_name_no_tag_or_error): New prototype. * valops.c (destructor_name_p): New comment for parameter type. Remove type const. Make dname and cp const. Call type_name_no_tag_or_error. * value.h (destructor_name_p): Remove type const. --- gdb/valops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdb/valops.c') diff --git a/gdb/valops.c b/gdb/valops.c index 99115b7..3676103 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3098,14 +3098,16 @@ classify_oload_match (struct badness_vector *oload_champ_bv, /* C++: return 1 is NAME is a legitimate name for the destructor of type TYPE. If TYPE does not have a destructor, or if NAME is - inappropriate for TYPE, an error is signaled. */ + inappropriate for TYPE, an error is signaled. Parameter TYPE should not yet + have CHECK_TYPEDEF applied, this function will apply it itself. */ + int -destructor_name_p (const char *name, const struct type *type) +destructor_name_p (const char *name, struct type *type) { if (name[0] == '~') { - char *dname = type_name_no_tag (type); - char *cp = strchr (dname, '<'); + const char *dname = type_name_no_tag_or_error (type); + const char *cp = strchr (dname, '<'); unsigned int len; /* Do not compare the template part for template classes. */ -- cgit v1.1