[cfe-dev] Tips for optimising libclang
Miguel Guedes
miguel.a.guedes at gmail.com
Wed Apr 3 02:09:14 PDT 2013
On Tue, 2013-04-02 at 20:51 +0200, Tobias Grosser wrote:
> This largely depends on the machine. On my (fast) laptop, the
> clang_complete example file in examples/boost.cpp takes 0.046 seconds.
>
> It would be really great to investigate this issue to get rid of the
> need to reparse.
After having looked into clang_complete (thanks for the tip, Tobias!) I
came to the conclusion that I'd coded my code completion logic wrong. I
was under the impression that before invoking clang_codeCompleteAt one
had to reparse the TU but it turns out that's not the case - all one has
to do is feed the source file contents in a CXUnsavedFile struct.
Thanks for your invaluable help!
--
Miguel
More information about the cfe-dev
mailing list