[analyzer] Fix a crash triggered by printing a note on a default argument

Instead, use the location of the call to print the note.