]> granicus.if.org Git - clang/commitdiff
Make RedeclarableResult's ownership-transferring constructor be a move
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 25 Feb 2015 01:11:29 +0000 (01:11 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 25 Feb 2015 01:11:29 +0000 (01:11 +0000)
constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230417 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReaderDecl.cpp

index 40466e23a0efc45bae49df4ac99f408f83061e04..339d0b87c250c10dbef754bd64bafd83507e729f 100644 (file)
@@ -127,16 +127,16 @@ namespace clang {
       Decl *MergeWith;
       mutable bool Owning;
       Decl::Kind DeclKind;
-      
+
       void operator=(RedeclarableResult &) = delete;
-      
+
     public:
       RedeclarableResult(ASTReader &Reader, GlobalDeclID FirstID,
                          Decl *MergeWith, Decl::Kind DeclKind)
         : Reader(Reader), FirstID(FirstID), MergeWith(MergeWith),
           Owning(true), DeclKind(DeclKind) {}
 
-      RedeclarableResult(const RedeclarableResult &Other)
+      RedeclarableResult(RedeclarableResult &&Other)
         : Reader(Other.Reader), FirstID(Other.FirstID),
           MergeWith(Other.MergeWith), Owning(Other.Owning),
           DeclKind(Other.DeclKind) {
@@ -148,7 +148,7 @@ namespace clang {
             Reader.PendingDeclChainsKnown.insert(FirstID).second)
           Reader.PendingDeclChains.push_back(FirstID);
       }
-      
+
       /// \brief Retrieve the first ID.
       GlobalDeclID getFirstID() const { return FirstID; }