File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1052,16 +1052,18 @@ private module GetConvertedResultExpression {
1052
1052
* Note that this predicate may return multiple results in cases where a conversion belond to a
1053
1053
* different AST element than its operand.
1054
1054
*/
1055
- Expr getConvertedResultExpression ( Instruction instr ) {
1055
+ Expr getConvertedResultExpression ( Instruction instr , int n ) {
1056
1056
// Only fully converted instructions has a result for `asConvertedExpr`
1057
1057
not conversionFlow ( unique( | | getAUse ( instr ) ) , _, false , false ) and
1058
- result = getConvertedResultExpressionImpl ( instr )
1058
+ result = getConvertedResultExpressionImpl ( instr ) and
1059
+ n = 0
1059
1060
or
1060
1061
// If the conversion also has a result then we return multiple results
1061
1062
exists ( Operand operand | conversionFlow ( operand , instr , false , false ) |
1063
+ n = 1 and
1062
1064
result = getConvertedResultExpressionImpl ( operand .getDef ( ) )
1063
1065
or
1064
- result = getConvertedResultExpression ( operand .getDef ( ) )
1066
+ result = getConvertedResultExpression ( operand .getDef ( ) , n - 1 )
1065
1067
)
1066
1068
}
1067
1069
You can’t perform that action at this time.
0 commit comments