Skip to content

Commit 09b5fb6

Browse files
committed
C++: Fix comments.
1 parent 6fd1bf8 commit 09b5fb6

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ class StdPairConstructor extends Constructor, TaintFunction {
1111
StdPairConstructor() { this.getDeclaringType().hasQualifiedName("std", "pair") }
1212

1313
/**
14-
* Gets the index of a parameter to this function that is a reference to the
15-
* value type of the container.
14+
* Gets the index of a parameter to this function that is a reference to
15+
* either value type of the pair.
1616
*/
1717
int getAValueTypeParameterIndex() {
1818
getParameter(result).getUnspecifiedType().(ReferenceType).getBaseType() =
1919
getDeclaringType().getTemplateArgument(_).(Type).getUnspecifiedType() // i.e. the `T1` or `T2` of this `std::pair<T1, T2>`
2020
}
2121

2222
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
23-
// taint flow from any parameter of the value type to the returned object
23+
// taint flow from any parameter of a value type to the qualifier
2424
input.isParameterDeref(getAValueTypeParameterIndex()) and
2525
(
2626
output.isReturnValue() // TODO: this is only needed for AST data flow, which treats constructors as returning the new object

0 commit comments

Comments
 (0)