aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-05-06 14:12:18 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-05-06 14:12:18 +0000
commitd8228535f5e83861361a366e2298a4d8c79e78d8 (patch)
tree161d3b918d124eda579d6b711262fde26ffa4d2b /gdb/valops.c
parent1976171a47ef25e0b893222c5d704c89a8678ed7 (diff)
downloadgdb-d8228535f5e83861361a366e2298a4d8c79e78d8.zip
gdb-d8228535f5e83861361a366e2298a4d8c79e78d8.tar.gz
gdb-d8228535f5e83861361a366e2298a4d8c79e78d8.tar.bz2
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.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c10
1 files changed, 6 insertions, 4 deletions
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. */