AST - collecting used VarDecl #7030
Unanswered
Pantelis Lekakis (plekakis)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am looking into using the IDxcIntelliSense interface to collect information about used global variables and structures,however after spending quite a bit of time on this, it seems harder than I thought.
Given a IDxcCursor pointing to some variable declaration, is there a way to find if this is actually used in the sourcecode? Looking into the text file generated by "ast-dump" cmdline option, I can see that it's correctly marking such declarations as "used", but fail to see how this is done.
Take the following minimal example:
-ast-dump correctly only marks "g_param" as used, however I can't find a way to detect this using the API.
Thank you in advance
All reactions