We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2ca25a commit 21fdc53Copy full SHA for 21fdc53
cpp/ql/src/experimental/Best Practices/UselessTest.ql
@@ -1,4 +1,3 @@
1
-
2
/**
3
* @name Useless Test
4
* @description A boolean condition that is guaranteed to never be evaluated should be deleted.
@@ -39,8 +38,8 @@ where
39
38
) and
40
eq.getRightOperand() instanceof Literal and
41
ne.getRightOperand() instanceof Literal and
42
- eq.getLeftOperand().getFullyConverted().getType() =
43
- ne.getLeftOperand().getFullyConverted().getType() and
+ eq.getLeftOperand().getFullyConverted().getUnspecifiedType() =
+ ne.getLeftOperand().getFullyConverted().getUnspecifiedType() and
44
nearestParent(eq) = nearestParent(ne) and
45
sameExpr(eq.getLeftOperand(), ne.getLeftOperand())
46
select ne, "Useless Test"
0 commit comments