@@ -77,7 +77,7 @@ DataFlow::Node getADestroyedNode() {
7777 )
7878}
7979
80- predicate isSinkImpl ( DataFlow:: Node sink , FunctionCall fc ) {
80+ predicate destroyedToBeginSink ( DataFlow:: Node sink , FunctionCall fc ) {
8181 exists ( CallInstruction call |
8282 call = sink .asOperand ( ) .( ThisArgumentOperand ) .getCall ( ) and
8383 fc = call .getUnconvertedResultExpression ( ) and
@@ -91,7 +91,7 @@ predicate isSinkImpl(DataFlow::Node sink, FunctionCall fc) {
9191module DestroyedToBeginConfig implements DataFlow:: ConfigSig {
9292 predicate isSource ( DataFlow:: Node source ) { source = getADestroyedNode ( ) }
9393
94- predicate isSink ( DataFlow:: Node sink ) { isSinkImpl ( sink , _) }
94+ predicate isSink ( DataFlow:: Node sink ) { destroyedToBeginSink ( sink , _) }
9595
9696 DataFlow:: FlowFeature getAFeature ( ) {
9797 // By blocking argument-to-parameter flow we ensure that we don't enter a
@@ -111,5 +111,5 @@ module DestroyedToBeginConfig implements DataFlow::ConfigSig {
111111module DestroyedToBeginFlow = DataFlow:: Global< DestroyedToBeginConfig > ;
112112
113113from DataFlow:: Node source , DataFlow:: Node sink , FunctionCall beginOrEnd
114- where DestroyedToBeginFlow:: flow ( source , sink ) and isSinkImpl ( sink , beginOrEnd )
114+ where DestroyedToBeginFlow:: flow ( source , sink ) and destroyedToBeginSink ( sink , beginOrEnd )
115115select source , "This object is destroyed before $@ is called." , beginOrEnd , beginOrEnd .toString ( )
0 commit comments