Files
codeql/cpp/ql/src/definitions.ql
Josh Soref 46b3f9a907 spelling: behaviour
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-14 15:08:43 -04:00

19 lines
595 B
Plaintext

/**
* @name Jump-to-definition links
* @description Generates use-definition pairs that provide the data
* for jump-to-definition in the code viewer of LGTM.
* @kind definitions
* @id cpp/jump-to-definition
*/
import definitions
from Top e, Top def, string kind
where
def = definitionOf(e, kind) and
// We need to exclude definitions for elements inside template instantiations,
// as these often lead to multiple links to definitions from the same source location.
// LGTM does not support this behaviour.
not e.isFromTemplateInstantiation(_)
select e, def, kind