summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/container/inlined_vector_test.cc6
-rw-r--r--absl/container/internal/inlined_vector.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/absl/container/inlined_vector_test.cc b/absl/container/inlined_vector_test.cc
index d9946b2a..b9a79f5b 100644
--- a/absl/container/inlined_vector_test.cc
+++ b/absl/container/inlined_vector_test.cc
@@ -1639,6 +1639,12 @@ TEST(DynamicVec, EmplaceBackAfterHeapAllocation) {
EXPECT_EQ(v.size(), 1u);
}
+TEST(DynamicVec, EmptyIteratorComparison) {
+ DynamicVec v;
+ EXPECT_EQ(v.begin(), v.end());
+ EXPECT_EQ(v.cbegin(), v.cend());
+}
+
TEST(AllocatorSupportTest, Constructors) {
using MyAlloc = CountingAllocator<int>;
using AllocVec = absl::InlinedVector<int, 4, MyAlloc>;
diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h
index cdfd868e..b2a602db 100644
--- a/absl/container/internal/inlined_vector.h
+++ b/absl/container/internal/inlined_vector.h
@@ -400,7 +400,7 @@ class Storage {
return reinterpret_cast<Pointer<A>>(data_.inlined.inlined_data);
}
- ConstPointer<A> GetInlinedData() const {
+ ABSL_ATTRIBUTE_NO_SANITIZE_CFI ConstPointer<A> GetInlinedData() const {
return reinterpret_cast<ConstPointer<A>>(data_.inlined.inlined_data);
}