1

I am using python bindings for libclang. When parsing a cpp file I parse every header included in the cpp (or rather the cpp after the preprocessor step). I am trying to find all references to certain artefacts, however browsing the same headers more than once is kinda slow.

Generally what I see is that an AST is generated for every translation unit. Is there a possibility to reuse an AST of a header that was already visited for a different translation unit? Or maybe any other suggestion to make it kinda faster (only static analysis, no compiling).

thatsme
  • 325
  • 1
  • 2
  • 10

0 Answers0