File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
cpp/ql/lib/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,24 @@ private class StdBasicString extends ClassTemplateInstantiation {
1515 StdBasicString ( ) { this .hasQualifiedName ( [ "std" , "bsl" ] , "basic_string" ) }
1616}
1717
18+ /**
19+ * The `std::basic_string::iterator` declaration.
20+ *
21+ * Intuitively, this class shouldn't be necessary as it's already captured
22+ * by the `StdIterator` class. However, this class ensures that the typedef inside the
23+ * body of the `std::string` class is also seen as an iterator.
24+ *
25+ * Eventually, we should be consistent about which of the following should be recognized as iterators:
26+ * 1. The typedef type.
27+ * 2. The template class of the resolved type.
28+ * 3. Any instantiation of the resolved type.
29+ */
30+ private class StdBasicStringIterator extends Iterator , Type {
31+ StdBasicStringIterator ( ) {
32+ this .getEnclosingElement ( ) instanceof StdBasicString and this .hasName ( "iterator" )
33+ }
34+ }
35+
1836/**
1937 * A `std::string` function for which taint should be propagated.
2038 */
You can’t perform that action at this time.
0 commit comments