private FunctionDefinitionDataType buildSignature(HighFunction hf) {
		// try to look up the function that is at the current cursor location
		//   If there isn't one, just use the function we are in.

		Function func = hf.getFunction();
		FunctionDefinitionDataType fsig = new FunctionDefinitionDataType(CategoryPath.ROOT,
			func.getName(), func.getProgram().getDataTypeManager());
		FunctionPrototype functionPrototype = hf.getFunctionPrototype();

		try {
			fsig.setCallingConvention(functionPrototype.getModelName());
		}
		catch (InvalidInputException e) {
			// ignore
		}

		int np = hf.getLocalSymbolMap().getNumParams();
		fsig.setReturnType(functionPrototype.getReturnType());

		ParameterDefinition[] args = new ParameterDefinitionImpl[np];
		for (int i = 0; i < np; i++) {
			HighSymbol parm = hf.getLocalSymbolMap().getParamSymbol(i);
			args[i] = new ParameterDefinitionImpl(parm.getName(), parm.getDataType(), null);
		}
		fsig.setArguments(args);
		fsig.setVarArgs(functionPrototype.isVarArg());
		fsig.setNoReturn(functionPrototype.hasNoReturn());
		return fsig;
	}
Verify and adjust function editor model using dynamic storage to reflect current state of 
decompiled results.  It may be necessary to switch model to use custom storage.
@param hf decompiled high function
@param model function editor model
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/SpecifyCPrototypeAction.java