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

Module Iterator

Provides an abstract class for accurate modeling of flow through output iterators. To use this QL library, create a QL class extending IteratorReferenceFunction with a characteristic predicate that selects the function or set of functions you are modeling. Within that class, override the predicates provided by AliasFunction to match the flow within that function.

Import path

import semmle.code.cpp.models.interfaces.Iterator

Imports

Models
cpp

Provides classes and predicates for working with C/C++ code.

Classes

GetIteratorFunction

A function which takes a container and returns an iterator over that container.

Iterator

A type which can be used as an iterator.

IteratorReferenceFunction

A function which takes an iterator argument and returns a reference that can be used to write to the iterator’s underlying collection.