File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
cpp/ql/lib/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,16 @@ private class IteratorByTraits extends Iterator {
34
34
IteratorByTraits ( ) { exists ( IteratorTraits it | it .getIteratorType ( ) = this ) }
35
35
}
36
36
37
+ /**
38
+ * The C++ standard includes an `std::iterator_traits` specialization for pointer types. When
39
+ * this specialization is included in the database, a pointer type `T*` will be an instance
40
+ * of the `IteratorByTraits` class. However, if the `T*` specialization is not in the database,
41
+ * we need to explicitly include them with this class.
42
+ */
43
+ private class IteratorByPointer extends Iterator instanceof PointerType {
44
+ IteratorByPointer ( ) { not this instanceof IteratorByTraits }
45
+ }
46
+
37
47
/**
38
48
* A type which has the typedefs expected for an iterator.
39
49
*/
You can’t perform that action at this time.
0 commit comments