CodeQL library for C/C++
codeql/cpp-all 0.12.10 (changelog, source)

Member predicate VariableDeclarationEntry::isDefinition

Holds if this is a definition of a variable.

This always holds for local variables and member variables, but need not hold for global variables. In the case of function parameters, this holds precisely when the enclosing FunctionDeclarationEntry is a definition.

predicate isDefinition()