File tree Expand file tree Collapse file tree
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,15 +178,21 @@ 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 |
182+ hasOperandAndIndex ( this , pragma [ only_bind_into ] ( op ) , pragma [ only_bind_into ] ( i ) )
183+ |
184+ exists ( int argumentIndex , ReturnIndirectionInstruction returnInd |
185+ op = returnInd .getSourceAddressOperand ( ) and
186+ returnInd .hasIndex ( argumentIndex ) and
187+ hasNonInitializeParameterDef ( returnInd .getIRVariable ( ) ) and
188+ result = TIndirectReturnKind ( argumentIndex , pragma [ only_bind_into ] ( i ) )
189+ )
190+ or
191+ exists ( ReturnValueInstruction return |
192+ op = return .getReturnAddressOperand ( ) and
193+ result = TNormalReturnKind ( i - 1 )
194+ )
186195 )
187- or
188- this .getAddressOperand ( ) = any ( ReturnValueInstruction r ) .getReturnAddressOperand ( ) and
189- result = TNormalReturnKind ( this .getIndirectionIndex ( ) - 1 )
190196 }
191197}
192198
You can’t perform that action at this time.
0 commit comments