CodeQL library for C/C++
codeql/cpp-all 0.12.8-dev (changelog, source)
Search

Member predicate Declaration::getNamespace

Gets the innermost namespace which contains this declaration.

The result will either be GlobalNamespace, or the tightest lexically enclosing namespace block. In particular, note that for declarations within structures, the namespace of the declaration is the same as the namespace of the structure.

Namespace getNamespace()