mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Apply suggestions from code review
Will make the same renames in the changed code also.. Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
@@ -172,8 +172,8 @@ class GuardNode extends ControlFlowNode {
|
||||
* It is important that all extending classes in scope are disjoint.
|
||||
*/
|
||||
class BarrierGuard extends GuardNode {
|
||||
/** Holds if this guard validates `e` upon evaluating to `v`. */
|
||||
abstract predicate checks(ControlFlowNode node, boolean testIsTrue);
|
||||
/** Holds if this guard validates `node` upon evaluating to `branch`. */
|
||||
abstract predicate checks(ControlFlowNode node, boolean branch);
|
||||
|
||||
/** Gets a node guarded by this guard. */
|
||||
final ExprNode getAGuardedNode() {
|
||||
|
||||
@@ -3,9 +3,9 @@ import experimental.dataflow.tainttracking.TestTaintLib
|
||||
class IsSafeCheck extends DataFlow::BarrierGuard {
|
||||
IsSafeCheck() { this.(CallNode).getNode().getFunc().(Name).getId() = "emulated_is_safe" }
|
||||
|
||||
override predicate checks(ControlFlowNode node, boolean testIsTrue) {
|
||||
override predicate checks(ControlFlowNode node, boolean branch) {
|
||||
node = this.(CallNode).getAnArg() and
|
||||
testIsTrue = true
|
||||
branch = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user