mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Fix missing getUnderlyingType() calls
In both cases we also care about named types whose underlying type is an integer type.
This commit is contained in:
@@ -422,7 +422,7 @@ class TypeAssertionCheck extends DataFlow::ExprNode, FlowStateTransformer {
|
||||
TypeAssertionCheck() {
|
||||
exists(TypeAssertExpr tae |
|
||||
this = DataFlow::exprNode(tae.getExpr()) and
|
||||
it = tae.getTypeExpr().getType()
|
||||
it = tae.getTypeExpr().getType().getUnderlyingType()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ class TypeSwitchVarFlowStateTransformer extends DataFlow::SsaNode, FlowStateTran
|
||||
TypeSwitchVarFlowStateTransformer() {
|
||||
exists(IR::TypeSwitchImplicitVariableInstruction insn, LocalVariable lv | insn.writes(lv, _) |
|
||||
this.getSourceVariable() = lv and
|
||||
it = lv.getType()
|
||||
it = lv.getType().getUnderlyingType()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user