private boolean addForeignTypedefIfNeeded(String dtName) {
		int ptrIndex = dtName.indexOf('*');
		int index = dtName.indexOf('[');
		String baseName = dtName.trim();
		if (index < 0 || index > ptrIndex) {
			index = ptrIndex;
		}
		if (index > 0) {
			baseName = dtName.substring(0, index).trim();
		}
		DataType ourType = foreignTypedefs.get(baseName);
		if (ourType != null && dataManager.getDataType("/" + baseName) == null) {
			TypedefDataType newTypedef = new TypedefDataType(CategoryPath.ROOT, baseName, ourType, dataManager);
			dataManager.resolve(newTypedef, null);
			return true;
		}
		return false;
	}
Reads the datatypes encoded in SARIF from the specified SARIF parser and
recreates them in a datatype manager.

@param result  the SARIF parser
@param monitor the task monitor
@throws SAXParseException  if an SARIF parse error occurs
@throws CancelledException if the user cancels the read operation
Ghidra/Features/Sarif/src/main/java/sarif/managers/DataTypesSarifMgr.java