Skip to content

Commit 4602a8a

Browse files
committed
C++: Simplify 'converts'.
1 parent 4b2758f commit 4602a8a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/semantic/SemanticExprSpecific.qll

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,8 @@ module SemanticExprConfig {
2222

2323
/** Holds if this instruction converts a value of type `tFrom` to a value of type `tTo`. */
2424
predicate converts(SemType tFrom, SemType tTo) {
25-
exists(IR::ConvertInstruction convert |
26-
this = convert and
27-
tFrom = getSemanticType(convert.getUnary().getResultIRType()) and
28-
tTo = getSemanticType(convert.getResultIRType())
29-
)
30-
or
31-
exists(IR::CopyValueInstruction copy |
32-
this = copy and
33-
tFrom = getSemanticType(copy.getUnary().getResultIRType()) and
34-
tTo = getSemanticType(copy.getResultIRType())
35-
)
25+
tFrom = getSemanticType(this.getUnary().getResultIRType()) and
26+
tTo = getSemanticType(this.getResultIRType())
3627
}
3728
}
3829

0 commit comments

Comments
 (0)