|
|
@ -150,8 +150,11 @@ class InternalMetadataWithArenaBase { |
|
|
|
GOOGLE_ATTRIBUTE_NOINLINE T* mutable_unknown_fields_slow() { |
|
|
|
GOOGLE_ATTRIBUTE_NOINLINE T* mutable_unknown_fields_slow() { |
|
|
|
Arena* my_arena = arena(); |
|
|
|
Arena* my_arena = arena(); |
|
|
|
Container* container = Arena::Create<Container>(my_arena); |
|
|
|
Container* container = Arena::Create<Container>(my_arena); |
|
|
|
|
|
|
|
// Two-step assignment works around a bug in clang's static analyzer:
|
|
|
|
|
|
|
|
// https://bugs.llvm.org/show_bug.cgi?id=34198.
|
|
|
|
|
|
|
|
ptr_ = container; |
|
|
|
ptr_ = reinterpret_cast<void*>( |
|
|
|
ptr_ = reinterpret_cast<void*>( |
|
|
|
reinterpret_cast<intptr_t>(container) | kTagContainer); |
|
|
|
reinterpret_cast<intptr_t>(ptr_) | kTagContainer); |
|
|
|
container->arena = my_arena; |
|
|
|
container->arena = my_arena; |
|
|
|
return &(container->unknown_fields); |
|
|
|
return &(container->unknown_fields); |
|
|
|
} |
|
|
|
} |
|
|
|