File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -178,15 +178,19 @@ private predicate hasNonInitializeParameterDef(IRVariable v) {
178178
179179class ReturnIndirectionNode extends IndirectReturnNode , ReturnNode {
180180 override ReturnKind getKind ( ) {
181- exists ( int argumentIndex , ReturnIndirectionInstruction returnInd |
182- returnInd .hasIndex ( argumentIndex ) and
183- this .getAddressOperand ( ) = returnInd .getSourceAddressOperand ( ) and
184- result = TIndirectReturnKind ( argumentIndex , this .getIndirectionIndex ( ) ) and
185- hasNonInitializeParameterDef ( returnInd .getIRVariable ( ) )
181+ exists ( Operand op , int i | hasOperandAndIndex ( this , op , i ) |
182+ exists ( int argumentIndex , ReturnIndirectionInstruction returnInd |
183+ op = pragma [ only_bind_out ] ( returnInd .getSourceAddressOperand ( ) ) and
184+ returnInd .hasIndex ( argumentIndex ) and
185+ hasNonInitializeParameterDef ( returnInd .getIRVariable ( ) ) and
186+ result = TIndirectReturnKind ( argumentIndex , i )
187+ )
188+ or
189+ exists ( ReturnValueInstruction return |
190+ op = pragma [ only_bind_out ] ( return .getReturnAddressOperand ( ) ) and
191+ result = TNormalReturnKind ( i - 1 )
192+ )
186193 )
187- or
188- this .getAddressOperand ( ) = any ( ReturnValueInstruction r ) .getReturnAddressOperand ( ) and
189- result = TNormalReturnKind ( this .getIndirectionIndex ( ) - 1 )
190194 }
191195}
192196
You can’t perform that action at this time.
0 commit comments