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

Skip to content

Commit 4563e32

Browse files
committed
C++: Remove data flows we shouldn't need in MemberFunction.
1 parent 26286e5 commit 4563e32

2 files changed

Lines changed: 225 additions & 235 deletions

File tree

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ class ConversionConstructorModel extends Constructor, TaintFunction {
3535
class CopyConstructorModel extends CopyConstructor, DataFlowFunction {
3636
override predicate hasDataFlow(FunctionInput input, FunctionOutput output) {
3737
// data flow from the first constructor argument to the returned object
38-
(
39-
input.isParameter(0)
40-
or
41-
input.isParameterDeref(0)
42-
) and
38+
input.isParameterDeref(0) and
4339
(
4440
output.isReturnValue()
4541
or
@@ -54,11 +50,7 @@ class CopyConstructorModel extends CopyConstructor, DataFlowFunction {
5450
class MoveConstructorModel extends MoveConstructor, DataFlowFunction {
5551
override predicate hasDataFlow(FunctionInput input, FunctionOutput output) {
5652
// data flow from the first constructor argument to the returned object
57-
(
58-
input.isParameter(0)
59-
or
60-
input.isParameterDeref(0)
61-
) and
53+
input.isParameterDeref(0) and
6254
(
6355
output.isReturnValue()
6456
or

0 commit comments

Comments
 (0)