[cfe-dev] clang_getCursorUSR : reverse?

Michael Mullin masmullin at gmail.com
Mon Jan 24 20:53:31 PST 2011


Hello

I might be misunderstanding clang_getCursorUSR.  I believe it's purpose is
to facilitate comparing entities across translation units, but Im not quite
sure how to exactly go about the comparison.

Is the client program supposed to recursively descend (visitChildren) the
second translation unit, testing clang_getCursorUSR on each cursor against
the cursor from the first translation unit it wants to find?

is there a way to keep this functionality "inside" the libclang api rather
than have the client be responsible for it?

eg
since there is a function
CXString clang_getCursorUSR( CXCursor );

should there be a function

CXCursor clang_getCursorFromUSR( CXString );

??

P.S. what piqued my curiosity is the libclang lecture found here:
http://devimages.apple.com/llvm/videos/Libclang.mov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110124/4942e638/attachment.html>


More information about the cfe-dev mailing list