Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust: add some toString implementations #18035

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions rust/ql/consistency-queries/DataFlowConsistency.ql
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ private import codeql.dataflow.internal.DataFlowImplConsistency
private module Input implements InputSig<Location, RustDataFlow> { }

import MakeConsistency<Location, RustDataFlow, RustTaintTracking, Input>

/**
* This adds `AstNode` class names to the results of `uniqueNodeToString`, if any.
*/
query predicate uniqueNodeToStringClasses(Node n, string cls) {
redsun82 marked this conversation as resolved.
Show resolved Hide resolved
uniqueNodeToString(n, _) and
cls = n.getCfgNode().getAstNode().getPrimaryQlClasses()
}