OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a2c607
)
Add basic in-bounds asserts to TinyPtrVector::erase.
author
Chandler Carruth
<chandlerc@gmail.com>
Wed, 1 Aug 2012 08:40:46 +0000
(08:40 +0000)
committer
Chandler Carruth
<chandlerc@gmail.com>
Wed, 1 Aug 2012 08:40:46 +0000
(08:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161103
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/TinyPtrVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/TinyPtrVector.h
b/include/llvm/ADT/TinyPtrVector.h
index
1038c78
..
d226bc2
100644
(file)
--- a/
include/llvm/ADT/TinyPtrVector.h
+++ b/
include/llvm/ADT/TinyPtrVector.h
@@
-215,6
+215,9
@@
public:
}
iterator erase(iterator I) {
+ assert(I >= begin() && "Iterator to erase is out of bounds.");
+ assert(I < end() && "Erasing at past-the-end iterator.");
+
// If we have a single value, convert to empty.
if (Val.template is<EltTy>()) {
if (I == begin())