Questions about Getting the Full Name in Using Declaration

The ::foo::bar is the nested name specifier.

According to

UsingDecl has getQualifier().
In clang-query you can follow this for a file like this:
namespace a { namespace b { class C; } };
using ::a::b::C

clang_query –

set output print
clang-query> m usingDecl(has(nestedNameSpecifier().bind(“x”)))

Match #1:

Binding for “root”:
using ::a::b::C
Binding for “x”:
1 match.