Add comment as follow up to r245712
[oota-llvm.git] / lib / IR / ConstantFold.cpp
index 131c5c51790414c6b1c81e27aaa3a1710c22d042..f63ce9bbf038a1fda1da0a987341727618729f24 100644 (file)
@@ -1999,6 +1999,7 @@ static bool isInBoundsIndices(ArrayRef<IndexTy> Idxs) {
 /// \brief Test whether a given ConstantInt is in-range for a SequentialType.
 static bool isIndexInRangeOfSequentialType(SequentialType *STy,
                                            const ConstantInt *CI) {
 /// \brief Test whether a given ConstantInt is in-range for a SequentialType.
 static bool isIndexInRangeOfSequentialType(SequentialType *STy,
                                            const ConstantInt *CI) {
+  // And indicies are valid when indexing along a pointer
   if (isa<PointerType>(STy))
     return true;
 
   if (isa<PointerType>(STy))
     return true;