mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Update FieldTarget.getBaseType()
It wasn't defined when `getBase()` was an EvalImplicitDerefInstruction. Rewriting it like this means it should work no matter what type of instruction `getBase()` is.
This commit is contained in:
@@ -1395,7 +1395,7 @@ module IR {
|
||||
}
|
||||
|
||||
/** Get the type of the base of this field access, that is, the type that contains the field. */
|
||||
Type getBaseType() { result = this.getBase().(EvalInstruction).getExpr().getType() }
|
||||
Type getBaseType() { result = this.getBase().getResultType() }
|
||||
|
||||
override predicate refersTo(ValueEntity e) {
|
||||
exists(SelectorExpr sel | this = MkLhs(_, sel) | sel.uses(e))
|
||||
|
||||
Reference in New Issue
Block a user