[cfe-dev] Announcing "clang-ctags"

David Röthlisberger david at rothlis.net
Thu Jul 26 02:11:11 PDT 2012


On 23 Jul 2012, at 22:54, Sean Silva wrote:
> Ouch. This [running clang-ctags] is longer than compiling it!

Here's something I found quite interesting:

When I run clang-ctags over clang/lib/Analysis/AnalysisDeclContext.cpp
it reports† that the call to clang_parseTranslationUnit takes 6.4s.

Giving the same compilation command directly to clang++ takes 1.4s.

This is a huge discrepancy, given that clang_parseTranslationUnit is
only doing parsing, whereas clang++ is parsing *and* compiling! Even
with -O3 clang++ only takes 1.6s. What can explain this?

† Running clang-ctags with "--verbose" prints the compilation command as
well as how long the call to clang_parseTranslationUnit took.





More information about the cfe-dev mailing list