from DataFlow::Node source, DataFlow::Node sink, FunctionCall fc where exists( | DataFlow::localFlow(source, sink) and source.asExpr() instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and check_name_post(fc.getTarget()) and fc.getAnArgument() = sink.asExpr() ) or exists(ReturnStmt ret | // 第一类 DataFlow::localFlow(source, sink) and source.asExpr() instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and ret.getExpr() = sink.asExpr() ) or exists( Parameter p | // 第二类 DataFlow::localFlow(source, sink) and source.asExpr() instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and sink.asExpr().getAChild*() = p.getAnAccess() ) select source.asExpr(), source.asExpr().getLocation()
// situation 1 from DataFlow::Node source,DataFlow::Node sink,FunctionCall fc where exists( | DataFlow::localFlow(source, sink) and source.asExpr() instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and check_name_post(fc.getTarget()) and fc.getAnArgument()=sink.asExpr() ) select source.asExpr(),source.asExpr().getLocation()
// situation 2 from DataFlow::Node source,DataFlow::Node sink,FunctionCall fc where exists(ReturnStmt ret | DataFlow::localFlow(source, sink) and source.asExpr()instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and ret.getExpr()= sink.asExpr()) select source.asExpr(),source.asExpr().getLocation()
// situation 3 from DataFlow::Node source,DataFlow::Node sink,Parameter p where exists( | DataFlow::localFlow(source, sink) and source.asExpr() instanceof FunctionCall and check_name_pre(source.asExpr().(FunctionCall).getTarget()) and sink.asExpr().getAChild*() = p.getAnAccess() ) select source.asExpr(),source.asExpr().getLocation()