Variable getResolvedVariable(Variable var, boolean voidOK, boolean useUnassignedStorage)
			throws InvalidInputException {
		DataType dt = var.getDataType();
		if (var instanceof Parameter) {
			dt = ((Parameter) var).getFormalDataType();
		}
		dt = VariableUtilities.checkDataType(dt, voidOK, Math.min(1, var.getLength()), program);
		DataType resolvedDt = program.getDataTypeManager().resolve(dt, null);
		VariableStorage storage = VariableStorage.UNASSIGNED_STORAGE;
		if (!useUnassignedStorage) {
			storage = var.getVariableStorage();
			if (storage.isAutoStorage()) {
				storage = new VariableStorage(program, storage.getVarnodes());
			}
			if (resolvedDt.getLength() != storage.size()) {
				try {
					storage = VariableUtilities.resizeStorage(storage, resolvedDt, true, this);
				}
				catch (Exception e) {
					// ignore sizing issues
				}
			}
		}

		LocalVariableImpl resolvedVar = new LocalVariableImpl(var.getName(),
			var.getFirstUseOffset(), resolvedDt, storage, true, program, var.getSource());
		resolvedVar.setComment(var.getComment());
		return resolvedVar;
	}
Resolve a variable's type and storage.
@param var variable to be resolved
@param voidOK if true the use of a 0-length {@link VoidDataType} for the specified
variable is allowed (i.e., {@link ReturnParameterDB}), else false should be specifed.
@param useUnassignedStorage if true storage should be set to {@link VariableStorage#UNASSIGNED_STORAGE}
else an attempt should be made to adjust the storage.
@return resolved variable
@throws InvalidInputException if unable to resize variable storage due to
resolved datatype size change
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java