private DataType resolveReturnType(Program program, Function function,
			Structure classDataType) {
		// If something is returned as a Union, Structure, or Class return.
		//       It appears that is passed as an additional parameter.  Essentially, it accesses
		//       the stack assuming there is reserved space.
		if (returnType != null) {
			return returnType.getDataType(program.getDataTypeManager());
		}

		// If returnType is null check for constructor or destructor names
		if (THIS_CALL.equals(function.getCallingConventionName())) {
			String n = getName();
			if (namespace != null && n.equals(namespace.getName())) {
				// constructor
				return DataType.DEFAULT;
			}
			if (n.equals("~" + namespace.getName())) {
				// destructor
				return VoidDataType.dataType;
			}
		}
		return null;
	}
Determine if existing thunk relationship should be preserved and mangled symbol
discarded.  This is the case when the thunk function mangled name matches
the thunked function since we want to avoid duplicate symbol names.
@param thunkFunction thunk function with a mangled symbol which is currently
being demangled.
@return true if thunk should be preserved and mangled symbol discarded, otherwise
false if thunk relationship should be eliminated and demangled function information
should be applied as normal.
Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemangledFunction.java