Skip to content

Commit 55e69d4

Browse files
authored
Merge pull request #7849 from Yonah125/main
C/C++: Useless Test : verification of "Fully converted" Type
2 parents 1f2865c + 61dc9ef commit 55e69d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/src/experimental/Best Practices/UselessTest.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ where
3838
) and
3939
eq.getRightOperand() instanceof Literal and
4040
ne.getRightOperand() instanceof Literal and
41+
eq.getLeftOperand().getFullyConverted().getUnspecifiedType() =
42+
ne.getLeftOperand().getFullyConverted().getUnspecifiedType() and
4143
nearestParent(eq) = nearestParent(ne) and
4244
sameExpr(eq.getLeftOperand(), ne.getLeftOperand())
4345
select ne, "Useless Test"

0 commit comments

Comments
 (0)