There are some functions which can't be given a null pointer as parameter either because it has a nonnull attribute or it is declared to have undefined behavior (e.g. strcmp()). Sometimes it is hard to determine from the checker message which parameter is null at the invocation, so now this information is included in the message.
This commit fixes https://bugs.llvm.org/show_bug.cgi?id=39358
I think Optional<unsigned> would be nicer. Also, checkNonNull as a function name doesn't scream about why we need an index parameter -- could you rename it to IndexOfArg or something similar?