When calling hasArrayFiller() on a APValue that's not an array, the two functions called inside hasArrayFiller() would both run into their isArray() assertions.
This triggered for me with the included test case in ExprConstant.cpp:
if (!Result.hasArrayFiller()) return Success;
adding a !Result.isArray() || there would also work of course but I think the version in this patch is safer.
I think this makes the interface somewhat self-inconsistent. hasLValuePath() asserts on isLValue(), and getArraySize() was providing a similar assertion (on isArray()) when called from hasArrayFiller().
I take that to mean that the expectation for this interface is that the caller validates the APValue in the cases where it doesn't already know the answer.