@Override
	public void removeParameter(int ordinal) {
		manager.lock.acquire();
		try {
			startUpdate();
			checkDeleted();
			if (thunkedFunction != null) {
				thunkedFunction.removeParameter(ordinal);
				return;
			}
			loadVariables();
			if (ordinal < 0) {
				throw new IndexOutOfBoundsException();
			}
			if (autoParams != null) {
				if (ordinal < autoParams.size()) {
					return; // ignore
				}
				ordinal -= autoParams.size();
			}
			if (ordinal >= params.size()) {
				throw new IndexOutOfBoundsException();
			}
			ParameterDB param = params.get(ordinal);
			param.symbol.delete(); // results in callback to doDeleteVariable
		}
		finally {
			endUpdate();
			manager.lock.release();
		}
	}
@see ghidra.program.model.listing.Function#insertParameter(int, ghidra.program.model.listing.Variable, ghidra.program.model.symbol.SourceType)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java