Skip to content

Commit 658dbf4

Browse files
committed
C++: getParameter(_) is considered an anti-pattern.
1 parent ddc5150 commit 658dbf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MakeUniqueOrShared extends TaintFunction {
1717
// Exclude the specializations of `std::make_shared` and `std::make_unique` that allocate arrays
1818
// since these just take a size argument, which we don't want to propagate taint through.
1919
not this.isArray() and
20-
input.isParameter(_) and
20+
input.isParameter([0 .. getNumberOfParameters() - 1]) and
2121
output.isReturnValue()
2222
}
2323

0 commit comments

Comments
 (0)