mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
C++: add comments in new iterator models
This commit is contained in:
@@ -338,6 +338,10 @@ class BeginOrEndFunction extends MemberFunction, TaintFunction, GetIteratorFunct
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The `std::front_inserter`, `std::inserter`, and `std::back_inserter`
|
||||
* functions.
|
||||
*/
|
||||
class InserterIteratorFunction extends GetIteratorFunction {
|
||||
InserterIteratorFunction() {
|
||||
this.hasName(["front_inserter", "inserter", "back_inserter"]) and
|
||||
|
||||
@@ -16,6 +16,13 @@ import semmle.code.cpp.models.Models
|
||||
*/
|
||||
abstract class IteratorReferenceFunction extends Function { }
|
||||
|
||||
/**
|
||||
* A function which takes a container and returns an iterator over that container.
|
||||
*/
|
||||
abstract class GetIteratorFunction extends Function {
|
||||
/**
|
||||
* Holds if the return value or buffer represented by `output` is an iterator over the container
|
||||
* passd in the argument, qualifier, or buffer represented by `input`.
|
||||
*/
|
||||
abstract predicate getsIterator(FunctionInput input, FunctionOutput output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user