diff --git a/ChangeLog b/ChangeLog index 18f6437d..d60a2395 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-09-12 Colomban Wendling + + * src/symbols.c: + Fix updating symbol list for overloaded C++ symbols (closes + #3406644). + + 2011-09-02 Colomban Wendling * src/ui_utils.c: diff --git a/src/symbols.c b/src/symbols.c index a2069bf0..222369f5 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -1191,7 +1191,9 @@ static gboolean tag_equal(gconstpointer v1, gconstpointer v2) const TMTag *t2 = v2; return (t1->type == t2->type && strcmp(t1->name, t2->name) == 0 && - utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope)); + utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope) && + /* include arglist in match to support e.g. C++ overloading */ + utils_str_equal(t1->atts.entry.arglist, t2->atts.entry.arglist)); } @@ -1210,6 +1212,12 @@ static guint tag_hash(gconstpointer v) for (p = tag->atts.entry.scope; *p != '\0'; p++) h = (h << 5) + h + *p; } + /* for e.g. C++ overloading */ + if (tag->atts.entry.arglist) + { + for (p = tag->atts.entry.arglist; *p != '\0'; p++) + h = (h << 5) + h + *p; + } return h; }