public void setFunctionData(FunctionDefinitionDataType functionDefinition) {

		setName(functionDefinition.getName());

		setCallingConventionName(functionDefinition.getCallingConventionName());

		DataType returnDt = functionDefinition.getReturnType();
		setFormalReturnType(returnDt);

		List<ParamInfo> oldParams = new ArrayList<>(getParameters());

		functionData.removeAllParameters();

		List<ParamInfo> parameters = functionData.getParameters();
		for (ParameterDefinition paramDefinition : functionDefinition.getArguments()) {
			parameters.add(new ParamInfo(functionData, paramDefinition));
		}

		setHasVarArgs(functionDefinition.hasVarArgs());

		functionData.fixupOrdinals();

		if (canUseCustomStorage()) {
			if (VoidDataType.isVoidDataType(returnDt)) {
				setReturnStorage(VariableStorage.VOID_STORAGE);
			}
			else if (!isSameSize(getFormalReturnType(), functionDefinition.getReturnType())) {
				setReturnStorage(VariableStorage.UNASSIGNED_STORAGE);
			}
			reconcileCustomStorage(oldParams, parameters);
		}

		selectedParams.clear();

		functionData.updateParameterAndReturnStorage();

		notifyDataChanged();
	}
Change custom storage enablement
@param b enablement state
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorModel.java