mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Use GVN for base case.
This commit is contained in:
@@ -40,7 +40,10 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) {
|
||||
*/
|
||||
Expr exprIsLeftOrLessBase(SubExpr sub) {
|
||||
interestingSubExpr(sub, _) and // Manual magic
|
||||
result = sub.getLeftOperand()
|
||||
exists(Expr e | globalValueNumber(e).getAnExpr() = sub.getLeftOperand() |
|
||||
// result = sub.getLeftOperand() so result <= sub.getLeftOperand()
|
||||
result = e
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user