<div dir="ltr">Hi Stephan, I'm sorry I tried some combinations of APIs in getDeclContext, which are related to namespace, but failed, can you show me some examples or related documents?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 4:32 PM Stephan Bergmann <<a href="mailto:sbergman@redhat.com">sbergman@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 31/07/2020 10:25, Yafei Liu via cfe-dev wrote:<br>
> I'm using an AST matcher to get some `clang::CXXRecordDecl`s, and now I <br>
> want to get the namespace of that record, but I searched all the apis <br>
> and cannot find one.<br>
<br>
such information is recorded in the DeclContext chain, reachable via <br>
Decl::getDeclContext<br>
<br>
</blockquote></div>