I’m using an AST matcher to get some clang::CXXRecordDecls, and now I want to get the namespace of that record, but I searched all the apis and cannot find one.
P.S. I dumped the record and found that there’s no information about namespaces, does that mean I have to handle finding namespaces as well? If that’s the case, an AST matcher seems not very helpful since I have to go through the source code anyway.
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?