In tagmanager/ctags/c.c:

>  	for (i = 0; i < st->tokenIndex; i++)
>  	{
> +		const tokenInfo *const t = st->token[i];
> +
> +		/* stop if we find the token used to generate the tag name, or
> +		 * a name token in the middle yet not preceded by a scope separator */
> +		if ((t == nameToken ||
> +		     (t->type == nameToken->type &&
> +		      t->keyword == nameToken->keyword &&
> +		      t->lineNumber == nameToken->lineNumber &&
> +		      strcmp(vStringValue(t->name), vStringValue(nameToken->name)) == 0)) ||
> +		    (t->type == TOKEN_NAME && seenType &&
> +		     (i > 0 && st->token[i - 1]->type != TOKEN_DOUBLE_COLON)))

Probably not, gives type typename foo::a (to qualifier::func() function).

Maybe typename could be handled specially if needed?
Or maybe another solution, like finding the name token first, and then going back to skip the possible qualifier, might give better results? it's what I first tried and it was a mess, but maybe it could be made to work.


Reply to this email directly or view it on GitHub.