Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-tags missing some uses of a function #28

Open
nrnrnr opened this issue Nov 15, 2019 · 0 comments
Open

clang-tags missing some uses of a function #28

nrnrnr opened this issue Nov 15, 2019 · 0 comments

Comments

@nrnrnr
Copy link

nrnrnr commented Nov 15, 2019

After using clang-tags successfully for some years, I had to rebuild it after a major OS upgrade. Now I have noticed some difficulty: it is not identifying every use of a function. Putting together a minimal test case might take several hours, but if there is a chance of the issue being fixed, I will do so. Meanwhile, here is some evidence.

clang-tags grep finds declaration, definition, and two uses of function topframe. I'm not sure why the uses are listed twice:

nr@homedog /t/b/p/uschemeplus> clang-tags grep c:@F@topframe
Server response:
all.h:434:Frame *topframe(Stack s);  // NULL if empty
context-stack.c:36:Frame *topframe (Stack s) {
eval-stack.c:153:topframe(evalstack)->syntax = e;
eval-stack.c:153:topframe(evalstack)->syntax = e;
eval-stack.c:216:fr = topframe(evalstack);
eval-stack.c:216:fr = topframe(evalstack);

The number of actual uses is found by grep:

nr@homedog /t/b/p/uschemeplus> grep -nw topframe *.h *.c
all.h:434:Frame *topframe(Stack s);  // NULL if empty
context-stack.c:36:Frame *topframe (Stack s) {
eval-stack.c:106:fr = topframe(evalstack);
eval-stack.c:133:fr = topframe(evalstack);
eval-stack.c:153:topframe(evalstack)->syntax = e;
eval-stack.c:216:fr = topframe(evalstack);
eval-stack.c:387:  fr = topframe(evalstack);   // fr now points to the next youngest frame
eval-stack.c:435:    Frame *f = optimize_tail_calls ? topframe(s) : NULL;
stack-debug.c:33:        if (topframe(s)) 

Efforts to use clang-tags find-def at that location produce only eval, which is the function containing the call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant