1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: Conforms with the exception specification of `std::atomic`
All constructors of `std::atomic` require `noexcept`. As a result, its members
must also be able to instantiate without any exception throwing.
Forwarded: not-needed
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -70,7 +70,7 @@
// 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<T> object, uint32_t index);
- DexCachePair() : index(0) {}
+ DexCachePair() noexcept : index(0) {}
DexCachePair(const DexCachePair<T>&) = default;
DexCachePair& operator=(const DexCachePair<T>&) = default;
@@ -93,7 +93,7 @@
NativeDexCachePair(T* object, uint32_t index)
: object(object),
index(index) {}
- NativeDexCachePair() : object(nullptr), index(0u) { }
+ NativeDexCachePair() noexcept : object(nullptr), index(0u) { }
NativeDexCachePair(const NativeDexCachePair<T>&) = default;
NativeDexCachePair& operator=(const NativeDexCachePair<T>&) = default;
--- a/runtime/mirror/object_reference.h
+++ b/runtime/mirror/object_reference.h
@@ -164,7 +164,7 @@
template<class MirrorType>
class MANAGED CompressedReference : public mirror::ObjectReference<false, MirrorType> {
public:
- CompressedReference<MirrorType>() REQUIRES_SHARED(Locks::mutator_lock_)
+ CompressedReference<MirrorType>() noexcept REQUIRES_SHARED(Locks::mutator_lock_)
: mirror::ObjectReference<false, MirrorType>(nullptr) {}
static CompressedReference<MirrorType> FromMirrorPtr(MirrorType* p)
--- a/runtime/gc_root.h
+++ b/runtime/gc_root.h
@@ -213,7 +213,7 @@
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<MirrorType> ref)
|