From: Android Tools Maintainers Date: Tue, 2 Aug 2022 15:23:27 +0000 (+0100) Subject: Conforms with the exception specification of `std::atomic` X-Git-Tag: archive/raspbian/29.0.6-21+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=63363131f7fbbaaf1c6eebc49daeebea869c3aac;p=android-platform-tools.git Conforms with the exception specification of `std::atomic` Forwarded: not-needed All constructors of `std::atomic` require `noexcept`. As a result, its members must also be able to instantiate without any exception throwing. Gbp-Pq: Topic art Gbp-Pq: Name atomic-exception-specification.patch --- diff --git a/art/runtime/gc_root.h b/art/runtime/gc_root.h index 8d8c32ce..358417dd 100644 --- a/art/runtime/gc_root.h +++ b/art/runtime/gc_root.h @@ -214,7 +214,7 @@ class GcRoot { return root_.IsNull(); } - ALWAYS_INLINE GcRoot() {} + ALWAYS_INLINE GcRoot() noexcept {} explicit ALWAYS_INLINE GcRoot(MirrorType* ref) REQUIRES_SHARED(Locks::mutator_lock_); explicit ALWAYS_INLINE GcRoot(ObjPtr ref) diff --git a/art/runtime/mirror/dex_cache.h b/art/runtime/mirror/dex_cache.h index 292db145..51ae22fd 100644 --- a/art/runtime/mirror/dex_cache.h +++ b/art/runtime/mirror/dex_cache.h @@ -69,7 +69,7 @@ template struct PACKED(8) DexCachePair { // Set the initial state for the 0th entry to be {0,1} which is guaranteed to fail // the lookup id == stored id branch. DexCachePair(ObjPtr object, uint32_t index); - DexCachePair() : index(0) {} + DexCachePair() noexcept : index(0) {} DexCachePair(const DexCachePair&) = default; DexCachePair& operator=(const DexCachePair&) = default; @@ -92,7 +92,7 @@ template struct PACKED(2 * __SIZEOF_POINTER__) NativeDexCachePair { NativeDexCachePair(T* object, uint32_t index) : object(object), index(index) {} - NativeDexCachePair() : object(nullptr), index(0u) { } + NativeDexCachePair() noexcept : object(nullptr), index(0u) { } NativeDexCachePair(const NativeDexCachePair&) = default; NativeDexCachePair& operator=(const NativeDexCachePair&) = default; diff --git a/art/runtime/mirror/object_reference.h b/art/runtime/mirror/object_reference.h index f01bcbd8..3d92f91a 100644 --- a/art/runtime/mirror/object_reference.h +++ b/art/runtime/mirror/object_reference.h @@ -164,7 +164,7 @@ static_assert(sizeof(mirror::HeapReference) == kHeapReferenceSiz template class MANAGED CompressedReference : public mirror::ObjectReference { public: - CompressedReference() REQUIRES_SHARED(Locks::mutator_lock_) + CompressedReference() noexcept REQUIRES_SHARED(Locks::mutator_lock_) : mirror::ObjectReference(nullptr) {} static CompressedReference FromMirrorPtr(MirrorType* p)