@Override
	public void setCallingConvention(String name) throws InvalidInputException {
		manager.lock.acquire();
		try {
			startUpdate();
			checkDeleted();
			if (thunkedFunction != null) {
				thunkedFunction.setCallingConvention(name);
				return;
			}

			byte newCallingConventionID =
				program.getDataTypeManager().getCallingConventionID(name, true);
			byte oldCallingConventionID =
				rec.getByteValue(FunctionAdapter.CALLING_CONVENTION_ID_COL);

			if (oldCallingConventionID == newCallingConventionID) {
				return; // no change
			}

			loadVariables();

			rec.setByteValue(FunctionAdapter.CALLING_CONVENTION_ID_COL, newCallingConventionID);
			manager.getFunctionAdapter().updateFunctionRecord(rec);

			boolean hasCustomStorage = hasCustomVariableStorage();
			if (!hasCustomStorage) {
				// remove 'this' param if switching to __thiscall with dynamic storage
				removeExplicitThisParameter();
			}

			frame.setInvalid();

			if (!hasCustomStorage) {
				createClassStructIfNeeded(); // TODO: How should thunks within Class namespace be handled?
				loadVariables();
				removeExplicitThisParameter();
				updateParametersAndReturn(); // assign dynamic storage
				manager.functionChanged(this, PARAMETERS_CHANGED);
				manager.functionChanged(this, RETURN_TYPE_CHANGED);
			}
			else {
				manager.functionChanged(this, null); // change did not affect parameters
			}
		}
		catch (IOException e) {
			manager.dbError(e);
		}
		finally {
			endUpdate();
			manager.lock.release();
		}
	}
Sets the indicated function flag to true or false.

@param functionFlagIndicator
           the function flag from the FunctionAdapter class (i.e.
           FunctionAdapter.FUNCTION_VARARG_FLAG,
           FunctionAdapter.FUNCTION_INLINE_FLAG,
           FunctionAdapter.FUNCTION_NO_RETURN_FLAG,
           FunctionAdapter.FUNCTION_CUSTOM_PARAM_STORAGE_FLAG)
@param shouldBeSet
           true means the indicated flag should be set.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java