mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: add consistency query printing AST classes of nodes with wrong toString
This commit is contained in:
@@ -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) {
|
||||
uniqueNodeToString(n, _) and
|
||||
cls = n.getCfgNode().getAstNode().getPrimaryQlClasses()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user