Remove duplicate clause

This commit is contained in:
Arthur Baars
2021-02-26 17:51:04 +01:00
parent 7ab147a7b8
commit dd4f297c37

View File

@@ -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()
)
}
/**