private boolean hasFlowRefInto(Address addr) {
		if (addr == null) {
			return false;
		}

		// check the flows into the next instruction
		ReferenceIterator refs = program.getReferenceManager().getReferencesTo(addr);
		while (refs.hasNext()) {
			Reference ref = refs.next();
			RefType refType = ref.getReferenceType();
			if (refType.isFlow()) {
				return true;
			}
		}
		return false;
	}
Get the next defined function after the current address.

Save the returned function along with the address
The nextFunction will be valid for any getNextFunction call for
addresses from lastGetNextFuncAddress to nextFunction,
which avoids an expensive funcMgr.getNextFunction() call

@param addr address to find the next defined function after
@return return the next function if found, or null otherwise
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/FindNoReturnFunctionsAnalyzer.java