mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Reintroduce 'StdBasicStringIterator'.
This commit is contained in:
@@ -15,6 +15,24 @@ private class StdBasicString extends ClassTemplateInstantiation {
|
|||||||
StdBasicString() { this.hasQualifiedName(["std", "bsl"], "basic_string") }
|
StdBasicString() { this.hasQualifiedName(["std", "bsl"], "basic_string") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `std::basic_string::iterator` declaration.
|
||||||
|
*
|
||||||
|
* Intuitively, this class shouldn't be necessary as it's already captured
|
||||||
|
* by the `StdIterator` class. However, this class ensures that the typedef inside the
|
||||||
|
* body of the `std::string` class is also seen as an iterator.
|
||||||
|
*
|
||||||
|
* Eventually, we should be consistent about which of the following should be recognized as iterators:
|
||||||
|
* 1. The typedef type.
|
||||||
|
* 2. The template class of the resolved type.
|
||||||
|
* 3. Any instantiation of the resolved type.
|
||||||
|
*/
|
||||||
|
private class StdBasicStringIterator extends Iterator, Type {
|
||||||
|
StdBasicStringIterator() {
|
||||||
|
this.getEnclosingElement() instanceof StdBasicString and this.hasName("iterator")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A `std::string` function for which taint should be propagated.
|
* A `std::string` function for which taint should be propagated.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user