diff: Use start of change when searching for function

Use the start of change when searching for a function rather than the
start of the context. In short functions if this could result in search
for the function name starting from before the function definition.

PR:		262086
Reviewed by:	bapt, mckusick, mhorne
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34328
This commit is contained in:
Tom Jones 2022-03-01 13:23:25 +00:00
parent 3cf2f812f5
commit 4be7d087c2

View File

@ -1462,7 +1462,7 @@ dump_context_vec(FILE *f1, FILE *f2, int flags)
printf("***************");
if (flags & (D_PROTOTYPE | D_MATCHLAST)) {
f = match_function(ixold, lowa - 1, f1);
f = match_function(ixold, cvp->a - 1, f1);
if (f != NULL)
printf(" %s", f);
}
@ -1569,7 +1569,7 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags)
uni_range(lowc, upd);
printf(" @@");
if (flags & (D_PROTOTYPE | D_MATCHLAST)) {
f = match_function(ixold, lowa - 1, f1);
f = match_function(ixold, cvp->a - 1, f1);
if (f != NULL)
printf(" %s", f);
}