Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 17 Mar 2016 18:05:07 +0000 (18:05 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 17 Mar 2016 18:05:07 +0000 (18:05 +0000)
Fix implicit copy ctor and copy assignment operator warnings
when -Wdeprecated passed.

Patch by Don Hinton!

Differential Revision: http://reviews.llvm.org/D18123

llvm-svn: 263730

clang/include/clang/AST/UnresolvedSet.h
clang/include/clang/Sema/Lookup.h

index 26ee1cf..12c825e 100644 (file)
@@ -59,8 +59,11 @@ class UnresolvedSetImpl {
   // UnresolvedSet.
 private:
   template <unsigned N> friend class UnresolvedSet;
-  UnresolvedSetImpl() {}
-  UnresolvedSetImpl(const UnresolvedSetImpl &) {}
+  UnresolvedSetImpl() = default;
+  UnresolvedSetImpl(const UnresolvedSetImpl &) = default;
+  UnresolvedSetImpl(UnresolvedSetImpl &&) = default;
+  UnresolvedSetImpl &operator=(const UnresolvedSetImpl &) = default;
+  UnresolvedSetImpl &operator=(UnresolvedSetImpl &&) = default;
 
 public:
   // We don't currently support assignment through this iterator, so we might
index 7efb19f..2cc4418 100644 (file)
@@ -185,6 +185,11 @@ public:
       Shadowed(false)
   {}
 
+  // FIXME: Remove these deleted methods once the default build includes
+  // -Wdeprecated.
+  LookupResult(const LookupResult &) = delete;
+  LookupResult &operator=(const LookupResult &) = delete;
+
   ~LookupResult() {
     if (Diagnose) diagnose();
     if (Paths) deletePaths(Paths);