CodeQL library for C/C++

Member predicate FriendDecl::getDefinitionLocation

Implements the abstract method Declaration.getDefinitionLocation. A friend declaration cannot be a definition because it is only a link to another class or function. But we have to provide an implementation of this method, so we use the location of the declaration as the location of the definition. Note: to get the target of the friend declaration, use getFriend.

Location getDefinitionLocation()