[PATCH] add InternalVector to sanitizer_common
Kostya Serebryany
kcc at google.com
Tue Feb 26 04:42:32 PST 2013
================
Comment at: lib/sanitizer_common/sanitizer_common.h:278
@@ +277,3 @@
+ }
+ T &operator[](uptr i) { return data_[i]; }
+ void push_back(const T &element) {
----------------
Maybe add a CHECK_LT(i, size_)?
================
Comment at: lib/sanitizer_common/sanitizer_common.h:280
@@ +279,3 @@
+ void push_back(const T &element) {
+ CHECK(size_ <= capacity_);
+ if (size_ == capacity_) {
----------------
CHECK_LE
================
Comment at: lib/sanitizer_common/sanitizer_common.h:265
@@ +264,3 @@
+// small vectors.
+// WARNING: The current implementation does not call destructors.
+template<typename T>
----------------
maybe just say "supports only PODs"
http://llvm-reviews.chandlerc.com/D463
More information about the llvm-commits
mailing list