private static boolean isDefaultPointer(DataType dt) {
		if (dt instanceof Pointer ptr) {
			DataType ptrDt = ptr.getDataType();
			return ptrDt == null || ptrDt == DataType.DEFAULT;
		}
		return false;
	}
Determine the final data-type which should be applied based upon a
user applied type of newDataType on an existing originalDataType.
Pointer conversion is performed when appropriate, otherwise the
newDataType is returned unchanged.
If newDataType is a FunctionDefinition, or Typedef to a FunctionDefinition, it will either be stacked
with the existing pointer if enabled/applicable, or will be converted to a pointer since
FunctionDefinitions may only been used in the form of a pointer.
Note that originalDataType and newDataType should be actual applied types.
(i.e., do not strip typedefs, pointers, arrays, etc.).
@param originalDataType existing data type onto which newDataTye is applied
@param newDataType new data-type being applied
@param stackPointers If true the following data type transformation will be performed:
<ul>
<li>If newDataType is a default pointer and the originalDataType
is a pointer the new pointer will wrap
the existing pointer thus increasing is 'depth'
(e.g., int * would become int ** when default pointer applied).
If the originalDataType is not a pointer the newDataType will be returned unchanged.
</li>
<li>If the originalDataType is any type of pointer the supplied newDatatype
will replace the pointer's base type (e.g., int * would become db * when
newDataType is {@link ByteDataType}).</li>
</ul>
<P>If false, only required transformations will be applied, Example:
if newDataType is a FunctionDefinitionDataType it will be transformed
to a pointer before being applied.
@return either a combined pointer data-type or the newDataType specified with any
required transformation
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataUtilities.java