protected AddressSet fixCallingFunctionBody(Program program, AddressSet callLocations,
			TaskMonitor monitor) throws CancelledException {

		AddressSet fixedSet = new AddressSet();
		AddressSet repairedFunctions = new AddressSet();

		AddressIterator addrIter = callLocations.getAddresses(true);
		while (addrIter.hasNext()) {
			Address fromAddr = addrIter.next();

			// don't fixup already fixed locations
			if (fixedSet.contains(fromAddr)) {
				continue;
			}
			Function fixFunc = program.getFunctionManager().getFunctionContaining(fromAddr);
			if (fixFunc == null) {
				continue;
			}

			// should always add fixed functions. any function could have an internal call to a non-returning function
			// the internal flows would have changed requiring other analysis to know about the changed body
			repairedFunctions.add(fixFunc.getEntryPoint());

			CreateFunctionCmd.fixupFunctionBody(program, fixFunc, monitor);

			fixedSet.add(fixFunc.getBody()); // new body
		}

		return repairedFunctions;
	}
Fix the bodies of all functions that called the non-returning function.

@param program containing the functions
@param callLocations that need the bodies of the functions containing them fixed
@param monitor to allow canceling

@return the set of all repaired function entry points

@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/CallFixupAnalyzer.java