Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ abstract class MemoryLocation0 extends TMemoryLocation {
*/
abstract class VirtualVariable extends MemoryLocation0 { }

pragma[nomagic]
private VirtualVariable getAllocationMemoryLocation(Allocation alloc) {
result.getAnAllocation() = alloc
}

abstract class AllocationMemoryLocation extends MemoryLocation0 {
Allocation var;
boolean isMayAccess;
Expand All @@ -313,7 +318,7 @@ abstract class AllocationMemoryLocation extends MemoryLocation0 {
result = getGroupedMemoryLocation(var, false, false).getVirtualVariable()
or
not exists(getGroupedMemoryLocation(var, false, false)) and
result.(AllocationMemoryLocation).getAnAllocation() = var
result = getAllocationMemoryLocation(var)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,11 @@ class TranslatedExplicitFieldInitialization extends TranslatedNonDefaultFieldIni
override int getPosition() { result = position }
}

pragma[nomagic]
private Instruction getCallInstruction(TranslatedDefaultFieldInitialization tdfi) {
result = tdfi.getInstruction(CallTag())
}

/**
* The IR translation of the initialization of a field from an element of an initializer
* list where default initialization is used.
Expand All @@ -642,7 +647,7 @@ class TranslatedDefaultFieldInitialization extends TranslatedFieldInitialization

override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) {
tag = CallTargetTag() and
result = this.getInstruction(CallTag())
result = getCallInstruction(this)
or
tag = CallTag() and
result = this.getSideEffects().getFirstInstruction(kind)
Expand Down
Loading