static void fixupReferencedVariable(Program p, Reference deletedRef) {
		Variable var = p.getReferenceManager().getReferencedVariable(deletedRef);
		if (var != null) {
			Symbol s = var.getSymbol();
			if (s != null && !(var instanceof Parameter) && s.getSource() == SourceType.DEFAULT &&
				s.getReferenceCount() == 0) {
				// Remove orphaned DEFAULT variable
				s.delete();
			}
		}
	}
Fixup referenced local function variable after removing a reference to it.
Method returns immediately if toAddr is not a stack or register address.
<ol>
<li>If a referenced DEFAULT variable has no remaining references it will be removed.</li>
<li>The firstUseOffset associated with a referenced local variable will be updated
to reflect the minimum reference offset within the function.</li>
</ol>
@param p program
@param deletedRef deleted reference
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/refs/RemoveReferenceCmd.java