private void makeNoReturnFunction(Program program, Symbol symbol, TaskMonitor monitor,
			MessageLog log) {
		// skip noreturn marking if its namespace is not global, library, or std
		// it prevents class methods (e.g. Menu::_exit()) incorrectly marked as noreturn
		Namespace parentNamespace = symbol.getParentNamespace();
		if (parentNamespace != null && !parentNamespace.isGlobal() &&
			!parentNamespace.isLibrary()) {
			List<String> pathList = parentNamespace.getPathList(true);
			if (!(pathList.size() == 1 && pathList.get(0) == "std")) {
				return;
			}
		}

		// if this is an external entry place holder, create the function in the external entry location
		symbol = checkForAssociatedExternalSymbol(symbol);

		if (symbol.isExternal()) {
			ExternalLocation externalLocation =
				program.getExternalManager().getExternalLocation(symbol);
			if (externalLocation != null) {
				Function functionAt = externalLocation.createFunction();
				//Msg.debug(this,
				//	"Setting \"no return\" flag on external function " + symbol.getName(true));
				functionAt.setNoReturn(true);
			}
			return;
		}

		Address address = symbol.getAddress();
		if (symbol.getSymbolType() == SymbolType.LABEL) {
			if (!SymbolType.FUNCTION.isValidParent(program, parentNamespace, address, false)) {
				return; // skip if parent does not permit function creation
			}
			CreateFunctionCmd fCommand = new CreateFunctionCmd(address);
			fCommand.applyTo(program, monitor);
		}

		Function functionAt = program.getFunctionManager().getFunctionAt(address);
		if (functionAt == null) {
			log.appendMsg("Failed to create \"no return\" function " + symbol.getName(true) +
				" at " + address);
			return;
		}

		//Msg.debug(this, "Setting \"no return\" flag on function " + symbol.getName(true) +
		//	" at " + address);

		functionAt.setNoReturn(true);

		// disassembled later after all bad functions have been marked

		if (createBookmarksEnabled) {
			program.getBookmarkManager()
					.setBookmark(address, BookmarkType.ANALYSIS, "Non-Returning Function",
						"Non-Returning Function Identified");
		}
	}
Make the symbol into a non-returning function

@param program program
@param symbol symbol for a function
@param monitor monitor
@param log log for errors
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/NoReturnFunctionAnalyzer.java