Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f507b51

Browse files
committed
C++: Fix Code Scanning errors.
1 parent 3e98623 commit f507b51

2 files changed

Lines changed: 2 additions & 33 deletions

File tree

cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private predicate summaryModel0(
197197
}
198198

199199
/**
200-
* Holds if `input` is `input0`, but with all occurences of `@` replaced
200+
* Holds if `input` is `input0`, but with all occurrences of `@` replaced
201201
* by `n` repetitions of `*` (and similarly for `output` and `output0`).
202202
*/
203203
bindingset[input0, output0, n]
@@ -701,7 +701,7 @@ private predicate hasClassAndName(Class classWithMethod, Function method, string
701701
}
702702

703703
/**
704-
* Holds if `nameClass` is in namespace `namespace` and has
704+
* Holds if `namedClass` is in namespace `namespace` and has
705705
* name `type` (excluding any template parameters).
706706
*/
707707
bindingset[type, namespace]

cpp/ql/lib/semmle/code/cpp/models/implementations/StdContainer.qll

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -55,37 +55,6 @@ private class Vector extends StdSequenceContainer {
5555
Vector() { this.hasQualifiedName(["std", "bsl"], "vector") }
5656
}
5757

58-
/**
59-
* Additional model for standard container constructors that reference the
60-
* value type of the container (that is, the `T` in `std::vector<T>`). For
61-
* example the fill constructor:
62-
* ```
63-
* std::vector<std::string> v(100, potentially_tainted_string);
64-
* ```
65-
*/
66-
private class StdSequenceContainerConstructor extends Constructor {
67-
StdSequenceContainerConstructor() {
68-
this.getDeclaringType() instanceof Vector or
69-
this.getDeclaringType() instanceof Deque or
70-
this.getDeclaringType() instanceof List or
71-
this.getDeclaringType() instanceof ForwardList
72-
}
73-
74-
/**
75-
* Gets the index of a parameter to this function that is a reference to the
76-
* value type of the container.
77-
*/
78-
int getAValueTypeParameterIndex() {
79-
this.getParameter(result).getUnspecifiedType().(ReferenceType).getBaseType() =
80-
this.getDeclaringType().getTemplateArgument(0).(Type).getUnspecifiedType() // i.e. the `T` of this `std::vector<T>`
81-
}
82-
83-
/**
84-
* Gets the index of a parameter to this function that is an iterator.
85-
*/
86-
int getAnIteratorParameterIndex() { this.getParameter(result).getType() instanceof Iterator }
87-
}
88-
8958
/**
9059
* The standard container functions `push_back` and `push_front`.
9160
*/

0 commit comments

Comments
 (0)