File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
cpp/ql/src/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ private class IteratorTraits extends Class {
2626 Type getIteratorType ( ) { result = this .getTemplateArgument ( 0 ) }
2727}
2828
29+ /**
30+ * A type that is deduced to be an iterator because there is a corresponding
31+ * `std::iterator_traits` instantiation for it.
32+ */
33+ private class IteratorByTraits extends Iterator {
34+ IteratorByTraits ( ) { exists ( IteratorTraits it | it .getIteratorType ( ) = this ) }
35+ }
36+
2937/**
3038 * A type which has the typedefs expected for an iterator.
3139 */
@@ -48,13 +56,9 @@ private class StdIterator extends Iterator, Class {
4856}
4957
5058/**
51- * A type that is deduced to be an iterator because there is a corresponding
52- * `std::iterator_traits` instantiation for it .
59+ * Gets the `FunctionInput` corresponding to an iterator parameter to
60+ * user-defined operator `op`, at `index` .
5361 */
54- private class IteratorByTraits extends Iterator {
55- IteratorByTraits ( ) { exists ( IteratorTraits it | it .getIteratorType ( ) = this ) }
56- }
57-
5862private FunctionInput getIteratorArgumentInput ( Operator op , int index ) {
5963 exists ( Type t |
6064 t =
You can’t perform that action at this time.
0 commit comments