Files
codeql/cpp/ql/test/library-tests/dataflow/crement/from0.ql
Anders Schack-Mulligen 72415c7c2c C++: Rename references.
2023-03-23 13:06:19 +01:00

15 lines
363 B
Plaintext

import cpp
import semmle.code.cpp.ir.dataflow.DataFlow
module Cfg implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source.asExpr().getValue() = "0" }
predicate isSink(DataFlow::Node sink) { sink.asExpr() instanceof VariableAccess }
}
module Flow = DataFlow::Global<Cfg>;
from Expr sink
where Flow::flowToExpr(sink)
select sink