[cfe-dev] [GSoC] Doxygen documentation with clang

Dmitri Gribenko gribozavr at gmail.com
Fri Mar 14 14:04:17 PDT 2014


On Fri, Mar 14, 2014 at 8:51 PM, Philipp Moeller <bootsarehax at gmail.com> wrote:
>
> On Mar 14, 2014 9:23 PM, "Dmitri Gribenko" <gribozavr at gmail.com> wrote:
>> About the indexing, Argyrios suggested that it would be best to
>> decouple the process into two steps:
>>
>> - indexing info should be produced as a separate file on disk (lets
>> call the file foo.clangindex)
>> - the tool can consume *.clangindex files to populate the database.
>>
>> This separation allows us in future to produce indexing information
>> during compilation as a sidecar file, so that if the user is building
>> the project anyway, we don't parse the for indexing and compilation
>> twice.
>
> Interesting. Is there some other part of clang that uses such files?

Not yet.  Nothing described in the paragraph above exists now.

> How
> would I know to which code base to attach them? Or do we leave setting this
> up to the user?

Sorry, I don't understand the question here...

> Is there a preference for certain data formats in clang?

In LLVM we usually prefer either stable future-proof text formats, or
binary files that are not guaranteed to be stable (because
forward/backward-compatibility for binary files is hard).  For binary
files Clang and LLVM usually use the bitcode library from LLVM, which
allows one to encode data in space-efficient way.  Because these
indexing files are supposed to be transient, and the amount of
information we might need to save from an average C++ translation unit
can be enormous, I think binary format would be the best.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list