CodeQL library for C#
codeql/csharp-all 0.9.1 (changelog, source)
Search

Member predicate LocalVariable::getInitializer

Gets the initializer expression of this local variable, if any. For example, the initializer of total is 0, and s has no initializer, in

void M(string[] ss) {
  int total = 0;
  ...
  foreach (var s in ss)
    ...
}
Expr getInitializer()