private void allocateReturnStorage(String name_unused, DataType dt, List<Varnode> varnodes,
			List<LocalVariable> returnResultAliasVars, boolean allowEndianFixups)
			throws InvalidInputException {
		if (DWARFUtil.isZeroByteDataType(dt)) {
			return;
		}

		List<Register> regStorage = storageAllocator.getRegistersFor(dt, allowEndianFixups);
		if (regStorage != null && !regStorage.isEmpty()) {
			List<Varnode> nodes =
				DWARFUtil.convertRegisterListToVarnodeStorage(regStorage, dt.getLength());
			varnodes.addAll(nodes);
		}
		else {
			long stackOffset = storageAllocator.getStackAllocation(dt);
			// when the return value is on the stack, the decompiler's output is improved
			// when the function has something at the stack location
			LocalVariableImpl returnAliasLocalVar = new LocalVariableImpl(name_unused, dt,
				(int) stackOffset, program, SourceType.USER_DEFINED);
			returnResultAliasVars.add(returnAliasLocalVar);

			if (!varnodes.isEmpty()) {
				int prevIndex = storageAllocator.isBigEndian()
						? varnodes.size() - 1
						: 0;
				Varnode prev = varnodes.get(prevIndex);
				if (prev.getAddress().isStackAddress()) {
					// if ( prev.getAddress().getOffset() + prev.getSize() != stackOffset ) {
					//	throw new InvalidInputException("Non-adjacent stack storage");
					// }

					Varnode updatedVN =
						new Varnode(prev.getAddress(), prev.getSize() + dt.getLength());
					varnodes.set(prevIndex, updatedVN);
					return;
				}
				// fall thru and add a new varnode
			}
			varnodes.add(!storageAllocator.isBigEndian() ? 0 : varnodes.size(),
				new Varnode(program.getAddressFactory().getStackSpace().getAddress(stackOffset),
					dt.getLength()));
		}
	}
Returns a Ghidra data type that represents a zero-length array, to be used as a replacement
for a zero-length array parameter.

@param dt data type that will donate its name to the created empty array type
@return {@link DataType} that represents a specific zero-length array type
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/GoFunctionFixup.java