We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a86f85 commit 27f0bf7Copy full SHA for 27f0bf7
llvm/include/llvm/ADT/ArrayRef.h
@@ -79,7 +79,9 @@ namespace llvm {
79
80
/// Construct an ArrayRef from a range.
81
constexpr ArrayRef(const T *begin, const T *end)
82
- : Data(begin), Length(end - begin) {}
+ : Data(begin), Length(end - begin) {
83
+ assert(begin <= end);
84
+ }
85
86
/// Construct an ArrayRef from a SmallVector. This is templated in order to
87
/// avoid instantiating SmallVectorTemplateCommon<T> whenever we
0 commit comments