CodeQL library for C/C++
Search

Member predicate NamespaceDeclarationEntry::getLocation

Gets the location of the token preceding the namespace declaration entry’s body.

For named declarations, such as “namespace MyStuff { … }”, this will give the “MyStuff” token.

For anonymous declarations, such as “namespace { … }”, this will give the “namespace” token.

Location getLocation()