I plan to use LLVM/Clang to index a project (with compile_commands.json) and find out all the place where a variable is modified.
Modern IDEA / language server already implement the “referenced by” feature, using which we could find all the places where a c++ variable is used. But they does not provide the “modified at” feathre. Also consdering that a variable could be refer to by some reference or pointer, it is harder to track all the places where a variable is modifed.
Is it possible to implement this feature using clang frontend ? Parsing the whole project, tracking all the variables that refer to that variable, and track all the places where these variables are modified. Is this a correct way, or is there ary other impossibility in theory ?
Thanks