mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C++: Cache DefaultTaintTracking
This should speed up the overall suite, where `DefaultTaintTracking` is used in several queries.
This commit is contained in:
committed by
Jonas Jensen
parent
94aa77748d
commit
ae68878476
@@ -343,6 +343,7 @@ private Element adjustedSink(DataFlow::Node sink) {
|
||||
result.(AssignOperation).getAnOperand() = sink.asExpr()
|
||||
}
|
||||
|
||||
cached
|
||||
predicate tainted(Expr source, Element tainted) {
|
||||
exists(DefaultTaintTrackingCfg cfg, DataFlow::Node sink |
|
||||
cfg.hasFlow(getNodeForSource(source), sink) and
|
||||
@@ -350,6 +351,7 @@ predicate tainted(Expr source, Element tainted) {
|
||||
)
|
||||
}
|
||||
|
||||
cached
|
||||
predicate taintedIncludingGlobalVars(Expr source, Element tainted, string globalVar) {
|
||||
tainted(source, tainted) and
|
||||
globalVar = ""
|
||||
|
||||
Reference in New Issue
Block a user