projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ac9e10
)
operator[] is not defined for list::iterator. Overload it in ilist::iterator
author
Nick Lewycky
<nicholas@mxc.ca>
Sat, 12 Jul 2008 07:00:52 +0000
(07:00 +0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Sat, 12 Jul 2008 07:00:52 +0000
(07:00 +0000)
to prevent silly things from happening accidentally. PR2171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53507
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/ilist.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/ilist.h
b/include/llvm/ADT/ilist.h
index 8d9bab5caaf0b048d2e3f1ab975b864fd81bbdd4..41253e030c5ffcba5ae1eaaa2a850b89a83ed966 100644
(file)
--- a/
include/llvm/ADT/ilist.h
+++ b/
include/llvm/ADT/ilist.h
@@
-93,6
+93,10
@@
public:
typedef typename super::reference reference;
private:
pointer NodePtr;
+
+ // operator[] is not defined. Compile error instead of having a runtime bug.
+ void operator[](unsigned) {}
+ void operator[](unsigned) const {}
public:
ilist_iterator(pointer NP) : NodePtr(NP) {}