mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
C++: Simplify 'converts'.
This commit is contained in:
@@ -22,17 +22,8 @@ module SemanticExprConfig {
|
||||
|
||||
/** Holds if this instruction converts a value of type `tFrom` to a value of type `tTo`. */
|
||||
predicate converts(SemType tFrom, SemType tTo) {
|
||||
exists(IR::ConvertInstruction convert |
|
||||
this = convert and
|
||||
tFrom = getSemanticType(convert.getUnary().getResultIRType()) and
|
||||
tTo = getSemanticType(convert.getResultIRType())
|
||||
)
|
||||
or
|
||||
exists(IR::CopyValueInstruction copy |
|
||||
this = copy and
|
||||
tFrom = getSemanticType(copy.getUnary().getResultIRType()) and
|
||||
tTo = getSemanticType(copy.getResultIRType())
|
||||
)
|
||||
tFrom = getSemanticType(this.getUnary().getResultIRType()) and
|
||||
tTo = getSemanticType(this.getResultIRType())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user