Hi,
On Thu, Mar 29, 2018 at 03:58:36PM +0000, Matthieu Brucher via cfe-dev <
[hidden email]> wrote:
> I know how to match a function by its name, but how is it possible to check
> that it's in the global namespace or namespace Foo?
Let's say you have:
----
int foo();
namespace n
{
int foo();
}
----
If you load this into clang-query, then just functionDecl() matches both
function declarations, but
functionDecl(hasParent(translationUnitDecl())) only matches the one in
the global namespace.
HTH,
Miklos
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev