Mark move constructors/assignements as `noexcept`.

And unmark `HashSet` copy constructor and copy assignment.

Test: m
Change-Id: Ia419f3036b2880815be446395e81c7e543388bd9
diff --git a/cmdline/cmdline_parse_result.h b/cmdline/cmdline_parse_result.h
index 982f178..95dc14a 100644
--- a/cmdline/cmdline_parse_result.h
+++ b/cmdline/cmdline_parse_result.h
@@ -119,7 +119,7 @@
   // Make sure copying is allowed
   CmdlineParseResult(const CmdlineParseResult&) = default;
   // Make sure moving is cheap
-  CmdlineParseResult(CmdlineParseResult&&) = default;
+  CmdlineParseResult(CmdlineParseResult&&) noexcept = default;
 
  private:
   explicit CmdlineParseResult(const T& value)
diff --git a/cmdline/cmdline_parser.h b/cmdline/cmdline_parser.h
index 7e343f8..5cdf446 100644
--- a/cmdline/cmdline_parser.h
+++ b/cmdline/cmdline_parser.h
@@ -229,7 +229,7 @@
     }
 
     // Ensure we always move this when returning a new builder.
-    ArgumentBuilder(ArgumentBuilder&&) = default;
+    ArgumentBuilder(ArgumentBuilder&&) noexcept = default;
 
    protected:
     // Used by builder to internally ignore arguments by dropping them on the floor after parsing.
@@ -372,7 +372,7 @@
     }
 
     // Ensure we always move this when returning a new builder.
-    UntypedArgumentBuilder(UntypedArgumentBuilder&&) = default;
+    UntypedArgumentBuilder(UntypedArgumentBuilder&&) noexcept = default;
 
    protected:
     void SetNames(std::vector<const char*>&& names) {
@@ -590,9 +590,9 @@
   }
 
   // Ensure we have a default move constructor.
-  CmdlineParser(CmdlineParser&&) = default;
+  CmdlineParser(CmdlineParser&&) noexcept = default;
   // Ensure we have a default move assignment operator.
-  CmdlineParser& operator=(CmdlineParser&&) = default;
+  CmdlineParser& operator=(CmdlineParser&&) noexcept = default;
 
  private:
   friend struct Builder;
diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h
index 964e238..dc2f8b7 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -436,7 +436,7 @@
 
   ParseList() = default;
   ParseList(const ParseList&) = default;
-  ParseList(ParseList&&) = default;
+  ParseList(ParseList&&) noexcept = default;
 
  private:
   std::vector<ArgType> list_;
@@ -457,7 +457,7 @@
 
   ParseStringList() = default;
   ParseStringList(const ParseStringList&) = default;
-  ParseStringList(ParseStringList&&) = default;
+  ParseStringList(ParseStringList&&) noexcept = default;
 };
 
 template <char Separator>
diff --git a/cmdline/detail/cmdline_parse_argument_detail.h b/cmdline/detail/cmdline_parse_argument_detail.h
index 0f73a76..95883cc 100644
--- a/cmdline/detail/cmdline_parse_argument_detail.h
+++ b/cmdline/detail/cmdline_parse_argument_detail.h
@@ -339,7 +339,7 @@
   CmdlineParserArgumentInfo() = default;
 
   // Ensure there's a default move constructor.
-  CmdlineParserArgumentInfo(CmdlineParserArgumentInfo&&) = default;
+  CmdlineParserArgumentInfo(CmdlineParserArgumentInfo&&) noexcept = default;
 
  private:
   // Perform type-specific checks at runtime.
diff --git a/compiler/utils/label.h b/compiler/utils/label.h
index 9586a19..282500b 100644
--- a/compiler/utils/label.h
+++ b/compiler/utils/label.h
@@ -59,7 +59,7 @@
  public:
   Label() : position_(0) {}
 
-  Label(Label&& src)
+  Label(Label&& src) noexcept
       : position_(src.position_) {
     // We must unlink/unbind the src label when moving; if not, calling the destructor on
     // the src label would fail.
diff --git a/dexlayout/dex_ir.h b/dexlayout/dex_ir.h
index 20ebc17..66ca84b 100644
--- a/dexlayout/dex_ir.h
+++ b/dexlayout/dex_ir.h
@@ -119,9 +119,9 @@
   using reference = typename std::iterator<std::random_access_iterator_tag, value_type>::reference;
 
   Iterator(const Iterator&) = default;
-  Iterator(Iterator&&) = default;
+  Iterator(Iterator&&) noexcept = default;
   Iterator& operator=(const Iterator&) = default;
-  Iterator& operator=(Iterator&&) = default;
+  Iterator& operator=(Iterator&&) noexcept = default;
 
   Iterator(const std::vector<T>& vector,
            uint32_t position,
diff --git a/libartbase/base/bit_vector.h b/libartbase/base/bit_vector.h
index 0c735cc..071577b 100644
--- a/libartbase/base/bit_vector.h
+++ b/libartbase/base/bit_vector.h
@@ -109,7 +109,7 @@
   BitVector(const BitVector& other) = delete;
   BitVector& operator=(const BitVector& other) = delete;
 
-  BitVector(BitVector&& other)
+  BitVector(BitVector&& other) noexcept
       : storage_(other.storage_),
         storage_size_(other.storage_size_),
         allocator_(other.allocator_),
diff --git a/libartbase/base/dchecked_vector.h b/libartbase/base/dchecked_vector.h
index e9ce6d0..66e9638 100644
--- a/libartbase/base/dchecked_vector.h
+++ b/libartbase/base/dchecked_vector.h
@@ -74,9 +74,9 @@
       : Base(src) { }
   dchecked_vector(const dchecked_vector& src, const allocator_type& alloc)
       : Base(src, alloc) { }
-  dchecked_vector(dchecked_vector&& src)
+  dchecked_vector(dchecked_vector&& src) noexcept
       : Base(std::move(src)) { }
-  dchecked_vector(dchecked_vector&& src, const allocator_type& alloc)
+  dchecked_vector(dchecked_vector&& src, const allocator_type& alloc) noexcept
       : Base(std::move(src), alloc) { }
   dchecked_vector(std::initializer_list<value_type> il,
                   const allocator_type& alloc = allocator_type())
@@ -86,7 +86,7 @@
     Base::operator=(src);
     return *this;
   }
-  dchecked_vector& operator=(dchecked_vector&& src) {
+  dchecked_vector& operator=(dchecked_vector&& src) noexcept {
     Base::operator=(std::move(src));
     return *this;
   }
diff --git a/libartbase/base/debug_stack.h b/libartbase/base/debug_stack.h
index 4743786..4bbaee8 100644
--- a/libartbase/base/debug_stack.h
+++ b/libartbase/base/debug_stack.h
@@ -95,7 +95,7 @@
   DebugStackReferenceImpl(const DebugStackReferenceImpl& other)
     : counter_(other.counter_), ref_count_(counter_->IncrementRefCount()) {
   }
-  DebugStackReferenceImpl(DebugStackReferenceImpl&& other)
+  DebugStackReferenceImpl(DebugStackReferenceImpl&& other) noexcept
     : counter_(other.counter_), ref_count_(other.ref_count_) {
     other.counter_ = nullptr;
   }
diff --git a/libartbase/base/hash_set.h b/libartbase/base/hash_set.h
index bd2ac38..97e27f3 100644
--- a/libartbase/base/hash_set.h
+++ b/libartbase/base/hash_set.h
@@ -44,7 +44,7 @@
   using reference = Elem&;
 
   HashSetIterator(const HashSetIterator&) = default;
-  HashSetIterator(HashSetIterator&&) = default;
+  HashSetIterator(HashSetIterator&&) noexcept = default;
   HashSetIterator(HashSetType* hash_set, size_t index) : index_(index), hash_set_(hash_set) {}
 
   // Conversion from iterator to const_iterator.
@@ -57,7 +57,7 @@
       : index_(other.index_), hash_set_(other.hash_set_) {}
 
   HashSetIterator& operator=(const HashSetIterator&) = default;
-  HashSetIterator& operator=(HashSetIterator&&) = default;
+  HashSetIterator& operator=(HashSetIterator&&) noexcept = default;
 
   bool operator==(const HashSetIterator& other) const {
     return hash_set_ == other.hash_set_ && this->index_ == other.index_;
@@ -234,7 +234,7 @@
     DCHECK_LT(max_load_factor, 1.0);
   }
 
-  HashSet(const HashSet& other) noexcept
+  HashSet(const HashSet& other)
       : allocfn_(other.allocfn_),
         hashfn_(other.hashfn_),
         emptyfn_(other.emptyfn_),
@@ -359,7 +359,7 @@
     return *this;
   }
 
-  HashSet& operator=(const HashSet& other) noexcept {
+  HashSet& operator=(const HashSet& other) {
     HashSet(other).swap(*this);  // NOLINT(runtime/explicit) - a case of lint gone mad.
     return *this;
   }
diff --git a/libartbase/base/intrusive_forward_list.h b/libartbase/base/intrusive_forward_list.h
index 47e4b4d..29db64d 100644
--- a/libartbase/base/intrusive_forward_list.h
+++ b/libartbase/base/intrusive_forward_list.h
@@ -149,11 +149,11 @@
   IntrusiveForwardList(InputIterator first, InputIterator last) : IntrusiveForwardList() {
     insert_after(before_begin(), first, last);
   }
-  IntrusiveForwardList(IntrusiveForwardList&& src) : first_(src.first_.next_hook) {
+  IntrusiveForwardList(IntrusiveForwardList&& src) noexcept : first_(src.first_.next_hook) {
     src.first_.next_hook = nullptr;
   }
   IntrusiveForwardList& operator=(const IntrusiveForwardList& src) = delete;
-  IntrusiveForwardList& operator=(IntrusiveForwardList&& src) {
+  IntrusiveForwardList& operator=(IntrusiveForwardList&& src) noexcept {
     IntrusiveForwardList tmp(std::move(src));
     tmp.swap(*this);
     return *this;
diff --git a/libartbase/base/safe_map.h b/libartbase/base/safe_map.h
index 371b257..9419860 100644
--- a/libartbase/base/safe_map.h
+++ b/libartbase/base/safe_map.h
@@ -48,7 +48,7 @@
 
   SafeMap() = default;
   SafeMap(const SafeMap&) = default;
-  SafeMap(SafeMap&&) = default;
+  SafeMap(SafeMap&&) noexcept = default;
   explicit SafeMap(const key_compare& cmp, const allocator_type& allocator = allocator_type())
     : map_(cmp, allocator) {
   }
diff --git a/libartbase/base/variant_map.h b/libartbase/base/variant_map.h
index 7349bbc..4244c9f 100644
--- a/libartbase/base/variant_map.h
+++ b/libartbase/base/variant_map.h
@@ -125,7 +125,7 @@
  protected:
   // Avoid the object slicing problem; use Clone() instead.
   VariantMapKeyRaw(const VariantMapKeyRaw&) = default;
-  VariantMapKeyRaw(VariantMapKeyRaw&&) = default;
+  VariantMapKeyRaw(VariantMapKeyRaw&&) noexcept = default;
 
  private:
   size_t key_counter_;  // Runtime type ID. Unique each time a new type is reified.
@@ -179,7 +179,7 @@
   }
 
   VariantMapKey(const VariantMapKey&) = default;
-  VariantMapKey(VariantMapKey&&) = default;
+  VariantMapKey(VariantMapKey&&) noexcept = default;
 
   template <typename Base, template <typename TV> class TKey> friend struct VariantMap;
 
@@ -372,12 +372,12 @@
   }
 
   // Create a new map by moving an existing map into this one. The other map becomes empty.
-  VariantMap(VariantMap&& other) {
+  VariantMap(VariantMap&& other) noexcept {
     operator=(std::forward<VariantMap>(other));
   }
 
   // Move the existing map's key/value pairs into this one. The other map becomes empty.
-  VariantMap& operator=(VariantMap&& other) {
+  VariantMap& operator=(VariantMap&& other) noexcept {
     if (this != &other) {
       Clear();
       storage_map_.swap(other.storage_map_);
diff --git a/runtime/base/timing_logger.h b/runtime/base/timing_logger.h
index 4f72a80..c1094bb 100644
--- a/runtime/base/timing_logger.h
+++ b/runtime/base/timing_logger.h
@@ -132,13 +132,8 @@
   class TimingData {
    public:
     TimingData() = default;
-    TimingData(TimingData&& other) {
-      std::swap(data_, other.data_);
-    }
-    TimingData& operator=(TimingData&& other) {
-      std::swap(data_, other.data_);
-      return *this;
-    }
+    TimingData(TimingData&& other) noexcept = default;
+    TimingData& operator=(TimingData&& other) noexcept = default;
     uint64_t GetTotalTime(size_t idx) {
       return data_[idx].total_time;
     }
diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h
index b26d6da..0d8ffa0 100644
--- a/runtime/gc/accounting/space_bitmap.h
+++ b/runtime/gc/accounting/space_bitmap.h
@@ -210,8 +210,8 @@
   // however, we document that this is expected on heap_end_
 
   SpaceBitmap() = default;
-  SpaceBitmap(SpaceBitmap&&) = default;
-  SpaceBitmap& operator=(SpaceBitmap&&) = default;
+  SpaceBitmap(SpaceBitmap&&) noexcept = default;
+  SpaceBitmap& operator=(SpaceBitmap&&) noexcept = default;
 
   bool IsValid() const {
     return bitmap_begin_ != nullptr;
diff --git a/runtime/gc/allocation_record.h b/runtime/gc/allocation_record.h
index 1d9a6ce..8b4cc67 100644
--- a/runtime/gc/allocation_record.h
+++ b/runtime/gc/allocation_record.h
@@ -77,7 +77,7 @@
 
   AllocRecordStackTrace() = default;
 
-  AllocRecordStackTrace(AllocRecordStackTrace&& r)
+  AllocRecordStackTrace(AllocRecordStackTrace&& r) noexcept
       : tid_(r.tid_),
         stack_(std::move(r.stack_)) {}
 
diff --git a/runtime/subtype_check.h b/runtime/subtype_check.h
index 493ea85..ca1feb5 100644
--- a/runtime/subtype_check.h
+++ b/runtime/subtype_check.h
@@ -586,7 +586,7 @@
   // Tests can inherit this class. Normal code should use static methods.
   SubtypeCheck() = default;
   SubtypeCheck(const SubtypeCheck& other) = default;
-  SubtypeCheck(SubtypeCheck&& other) = default;
+  SubtypeCheck(SubtypeCheck&& other) noexcept = default;
   ~SubtypeCheck() = default;
 
   friend struct MockSubtypeCheck;
diff --git a/runtime/verifier/scoped_newline.h b/runtime/verifier/scoped_newline.h
index eb81bfa..fb29e3e 100644
--- a/runtime/verifier/scoped_newline.h
+++ b/runtime/verifier/scoped_newline.h
@@ -28,7 +28,7 @@
 struct ScopedNewLine {
   explicit ScopedNewLine(std::ostream& os) : stream(os) {}
 
-  ScopedNewLine(ScopedNewLine&& other) : stream(other.stream), active(other.active) {
+  ScopedNewLine(ScopedNewLine&& other) noexcept : stream(other.stream), active(other.active) {
     other.active = false;
   }