1

What way would you recommend of getting the definition of (global) variable var as it is in the source code snippet int var = MACRO(5) + 5; using Clang/Libclang if I have var's definition cursor?

One way would be to use the cursor's extents to extract the definition from the source code, but are there other ways, like reconstructing the definition using the AST?

PhantomR
  • 605
  • 4
  • 16

0 Answers0