Handle C++ functions with clang API to insert code

前端 未结 3 1982
孤独总比滥情好
孤独总比滥情好 2021-02-02 02:35

I need to preprocess some C++ files to automatically insert code for testing and profiling, and I need to do it with the clang API.

Fo

3条回答
  •  悲哀的现实
    2021-02-02 03:25

    I agree that the documentation of CLang might be lacking in some area. This is, unfortunately, the way Open Source works: it will lacking until someone needs it, figures it out and decide to contribute back his findings.

    For you specific problem I suggest you post on the Clang Dev mailing list (or begin by sifting through the archives). Questions about ASTConsumers or other transform analysis are quite frequent and usually promptly answered to.

    And then, when you've learned what you were looking for, do think about upgrading the documentation ;)

提交回复
热议问题