Skip to content

Commit 1edfd04

Browse files
committed
C++: BSL Support.
1 parent 3cfb0a2 commit 1edfd04

File tree

1 file changed

+4
-4
lines changed
  • cpp/ql/src/semmle/code/cpp/models/implementations

1 file changed

+4
-4
lines changed

cpp/ql/src/semmle/code/cpp/models/implementations/Iterator.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import semmle.code.cpp.models.interfaces.Iterator
1515
*/
1616
private class IteratorTraits extends Class {
1717
IteratorTraits() {
18-
this.hasQualifiedName("std", "iterator_traits") and
18+
this.hasQualifiedName(["std", "bsl"], "iterator_traits") and
1919
not this instanceof TemplateClass and
2020
exists(TypedefType t |
2121
this.getAMember() = t and
@@ -44,15 +44,15 @@ private class IteratorByTypedefs extends Iterator, Class {
4444
this.getAMember().(TypedefType).hasName("pointer") and
4545
this.getAMember().(TypedefType).hasName("reference") and
4646
this.getAMember().(TypedefType).hasName("iterator_category") and
47-
not this.hasQualifiedName("std", "iterator_traits")
47+
not this.hasQualifiedName(["std", "bsl"], "iterator_traits")
4848
}
4949
}
5050

5151
/**
5252
* The `std::iterator` class.
5353
*/
5454
private class StdIterator extends Iterator, Class {
55-
StdIterator() { this.hasQualifiedName("std", "iterator") }
55+
StdIterator() { this.hasQualifiedName(["std", "bsl"], "iterator") }
5656
}
5757

5858
/**
@@ -340,7 +340,7 @@ private class BeginOrEndFunction extends MemberFunction, TaintFunction, GetItera
340340
*/
341341
private class InserterIteratorFunction extends GetIteratorFunction {
342342
InserterIteratorFunction() {
343-
this.hasQualifiedName("std", ["front_inserter", "inserter", "back_inserter"])
343+
this.hasQualifiedName(["std", "bsl"], ["front_inserter", "inserter", "back_inserter"])
344344
}
345345

346346
override predicate getsIterator(FunctionInput input, FunctionOutput output) {

0 commit comments

Comments
 (0)