[cfe-dev] Tips for optimising libclang
tobias at grosser.es
Wed Apr 3 23:37:09 PDT 2013
On 04/04/2013 07:20 AM, Miguel Guedes wrote:
> On Wed, 2013-04-03 at 14:30 -0400, Sean Silva wrote:
>> Can you suggest a specific improvement to the documentation that would
>> help avoid this issue in the future?
> Well, I find that a difficult question to answer because my mother
> tongue isn't English and so you could argue that the documentation is
> clear enough and it was I who failed to understand it.
> However, my personal opinion is that indeed it could do with some
> improvements designed to remove (what I think are) ambiguities and to
> make it easier for users who lack in-depth knowledge of clang, libclang
> or compiler technologies in general, as is my case, to use (lib)clang
> and develop. My personal opinion is the clearer the documentation is the
> less noise (like this very thread) the core cfe-devs would (perhaps) get
> in this mailing list; noise, which I'm sure is annoying - it took me
> awhile before I finally convinced myself I should post here.
> As requested, here's a few suggestions based on my (most) limited
> knowledge of libclang:
> * Creation of precompiled preamble
> There's no mention in the documentation about the issue that Tobias
> raised in this thread; that the preamble is only created after the TU is
> parsed a second time. IOW, the documentation should make it clear that
> one must issue clang_parseTranslationUnit, followed by
> clang_reparseTranslationUnit to ensure the preamble is created.
> BTW, no one has commented on whether this is a bug or a feature. I
> take it it's the former?
For me this looks like a bug or a behavior that is so surprising that it
should be mentioned in the documentation. It would be really good if
some clang autocompletion expert could comment on this.
More information about the cfe-dev