Decl to Entity conversion

Hi all,
Can any one tell me how can i convert the clang::Decl to clang::idx::Entity?
Is clang::idx::Entity is useful to find the functions from different translation unit?

thanks
akshay

To do cross-TU referencing the optimal thing would probably be USRs
(see http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexUSRs.cpp?revision=152536&view=markup).

They seem coupled to libclang though, so I don't know how useful they
are when you want to use them from a clang plugin... Others may be
able to give context here.

Cheers,
/Manuel