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 {
26
26
Type getIteratorType ( ) { result = this .getTemplateArgument ( 0 ) }
27
27
}
28
28
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
+
29
37
/**
30
38
* A type which has the typedefs expected for an iterator.
31
39
*/
@@ -48,13 +56,9 @@ private class StdIterator extends Iterator, Class {
48
56
}
49
57
50
58
/**
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` .
53
61
*/
54
- private class IteratorByTraits extends Iterator {
55
- IteratorByTraits ( ) { exists ( IteratorTraits it | it .getIteratorType ( ) = this ) }
56
- }
57
-
58
62
private FunctionInput getIteratorArgumentInput ( Operator op , int index ) {
59
63
exists ( Type t |
60
64
t =
You can’t perform that action at this time.
0 commit comments