File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
cpp/ql/src/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,13 @@ import semmle.code.cpp.models.interfaces.DataFlow
7
7
import semmle.code.cpp.models.interfaces.Taint
8
8
9
9
/**
10
- * Model for C++ constructors (including copy and move constructors) .
10
+ * Model for C++ conversion constructors.
11
11
*/
12
- class ConstructorModel extends Constructor , TaintFunction {
12
+ class ConversionConstructorModel extends ConversionConstructor , TaintFunction {
13
13
override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
14
- // taint flow from any constructor argument to the returned object
15
- exists ( int idx |
16
- input .isParameter ( idx ) and
17
- output .isReturnValue ( ) and
18
- not this .( CopyConstructorModel ) .hasDataFlow ( input , output ) and // don't duplicate where we have data flow
19
- not this .( MoveConstructorModel ) .hasDataFlow ( input , output ) // don't duplicate where we have data flow
20
- )
14
+ // taint flow from the first constructor argument to the returned object
15
+ input .isParameter ( 0 ) and
16
+ output .isReturnValue ( )
21
17
}
22
18
}
23
19
You can’t perform that action at this time.
0 commit comments