@Override
	public boolean applyTo(Program program, Address address, DemanglerOptions options,
			TaskMonitor monitor) throws Exception {

		if (isAlreadyDemangled(program, address)) {
			return true;
		}

		if (!super.applyTo(program, address, options, monitor)) {
			return false;
		}

		Symbol demangledSymbol = applyDemangledName(address, true, true, program);
		DataType demangledDT = getProgramDataType(program);

		if (address.isExternalAddress()) {
			if (demangledSymbol == null) {
				throw new AssertException("Undefined external address: " + address);
			}
			if (demangledDT != null) {
				ExternalLocation extLoc = (ExternalLocation) demangledSymbol.getObject();
				extLoc.setDataType(demangledDT);
			}
			return true;
		}

		Listing listing = program.getListing();

		Data d = listing.getDefinedDataAt(address);
		if (d != null) {
			if (demangledDT == null || !Undefined.isUndefined(d.getDataType())) {
				return true; // preserve existing data quietly
			}
		}

		if (demangledDT != null) {
			CreateDataCmd cmd = new CreateDataCmd(address, demangledDT, false,
				ClearDataMode.CLEAR_ALL_UNDEFINED_CONFLICT_DATA);
			if (!cmd.applyTo(program)) {
				String message = cmd.getStatusMsg();
				setErrorMessage(message);
				Msg.error(this, message);
				return false;
			}
			return true;
		}

		// if the block is marked Executable, don't worry about creating data here
		// unless we really know what type of data it is
		MemoryBlock block = program.getMemory().getBlock(address);
		if (block == null || block.isExecute()) {
			return true;
		}

		// get the symbol after this one.  If smaller than pointer, can't be a pointer
		Address nextSymbolLoc = getNextSymbolLocation(program, address);

		// could be a pointer
		long maximumDataTypeSize = nextSymbolLoc.subtract(address);
		if (createPointer(program, address, maximumDataTypeSize)) {
			return true;
		}

		// Create an undefined data type here to stop any code from being created.
		// Might have to change the data reference creation to ignore undefined data types
		//   when trying to figure out what the data is.
		if (d != null) {
			// something is already there
			return true;
		}

		int size = (maximumDataTypeSize <= 8) ? (int) maximumDataTypeSize : 1;
		demangledDT = Undefined.getUndefinedDataType(size);

		try {
			listing.createData(address, demangledDT);
		}
		catch (CodeUnitInsertionException e) {
			String message = "Unable to create demangled data '" + demangledDT + "' @ " + address;
			setErrorMessage(message);
			Msg.trace(this, message);
		}

		return true; // return true, as we did not fail to demangle
	}
Returns the data type of this variable.
@return the data type of this variable
Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemangledVariable.java