[cfe-dev] CXCursor_NamespaceAlias - How to get cursor for aliased namespace?

Milian Wolff mail at milianw.de
Mon Jan 6 07:30:40 PST 2014


On Monday 06 January 2014 16:05:36 Milian Wolff wrote:
> Hey all!
> 
> When encountering a CXCursor_NamespaceAlias - how can I get the aliased
> namespace? I.e.:
> 
> namespace n1 {};
> 
> // how do I figure out that n2 aliases n1?
> namespace n2 = n1;
> 
> I'm looking for something similar to clang_getTypedefDeclUnderlyingType.

I have now found a way via clang_visitChildren on the NamespaceAlias cursor. 

Still, I think a higher-level API similar to 
clang_getTypedefDeclUnderlyingType would be nice to have here! Or am I missing 
something which provides this?

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de



More information about the cfe-dev mailing list