mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Remove duplicate clause
This commit is contained in:
@@ -175,18 +175,13 @@ private predicate inBooleanContext(AstNode n) {
|
||||
or
|
||||
n = any(NotExpr parent | inBooleanContext(parent)).getOperand()
|
||||
or
|
||||
n = any(ParenthesizedExpr parent | inBooleanContext(parent)).getLastExpr()
|
||||
n = any(StmtSequence parent | inBooleanContext(parent)).getLastExpr()
|
||||
or
|
||||
exists(CaseExpr c, WhenExpr w |
|
||||
not exists(c.getValue()) and
|
||||
c.getAWhenBranch() = w and
|
||||
w.getPattern(_) = n
|
||||
)
|
||||
or
|
||||
exists(StmtSequence parent |
|
||||
inBooleanContext(parent) and
|
||||
n = parent.getLastExpr()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user