private boolean functionContainsDataType(Address functionAddress) {
		FunctionManager functionManager = program.getFunctionManager();
		Function function = functionManager.getFunctionAt(functionAddress);
		DataType currentDataType = getDataType();
		if (function != null) {
			List<Variable> allVariables = ReferenceUtils.getVariables(function, true);
			for (Variable variable : allVariables) {
				DataType variableDataType = variable.getDataType();
				if (ReferenceUtils.getBaseDataType(variableDataType)
						.isEquivalent(currentDataType)) {
					return true;
				}
			}

			DataType returnType = function.getReturnType();
			if (ReferenceUtils.getBaseDataType(returnType).isEquivalent(currentDataType)) {
				return true;
			}
		}

		return false;
	}
The base data type that this location descriptor describes (this may be the same as the
original data type.
@return the type.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/DataTypeLocationDescriptor.java