From: David Blaikie Date: Thu, 17 Mar 2016 18:05:07 +0000 (+0000) Subject: Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=053ebfe0e764b6ed5c00d1734ba77e9f94c37770;p=clang Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed. Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed. Patch by Don Hinton! Differential Revision: http://reviews.llvm.org/D18123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263730 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/UnresolvedSet.h b/include/clang/AST/UnresolvedSet.h index 26ee1cf71c..12c825e434 100644 --- a/include/clang/AST/UnresolvedSet.h +++ b/include/clang/AST/UnresolvedSet.h @@ -59,8 +59,11 @@ class UnresolvedSetImpl { // UnresolvedSet. private: template 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 diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index 7efb19f574..2cc4418c32 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -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);