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 {
10521052 * Note that this predicate may return multiple results in cases where a conversion belond to a
10531053 * different AST element than its operand.
10541054 */
1055- Expr getConvertedResultExpression ( Instruction instr ) {
1055+ Expr getConvertedResultExpression ( Instruction instr , int n ) {
10561056 // Only fully converted instructions has a result for `asConvertedExpr`
10571057 not conversionFlow ( unique( | | getAUse ( instr ) ) , _, false , false ) and
1058- result = getConvertedResultExpressionImpl ( instr )
1058+ result = getConvertedResultExpressionImpl ( instr ) and
1059+ n = 0
10591060 or
10601061 // If the conversion also has a result then we return multiple results
10611062 exists ( Operand operand | conversionFlow ( operand , instr , false , false ) |
1063+ n = 1 and
10621064 result = getConvertedResultExpressionImpl ( operand .getDef ( ) )
10631065 or
1064- result = getConvertedResultExpression ( operand .getDef ( ) )
1066+ result = getConvertedResultExpression ( operand .getDef ( ) , n - 1 )
10651067 )
10661068 }
10671069
You can’t perform that action at this time.
0 commit comments