On Tue, Feb 24, 2015 at 5:11 PM, Richard Smith <[email protected]> wrote:
> Author: rsmith > Date: Tue Feb 24 19:11:29 2015 > New Revision: 230417 > > URL: http://llvm.org/viewvc/llvm-project?rev=230417&view=rev > Log: > Make RedeclarableResult's ownership-transferring constructor be a move > constructor. > > Modified: > cfe/trunk/lib/Serialization/ASTReaderDecl.cpp > > Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=230417&r1=230416&r2=230417&view=diff > > ============================================================================== > --- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original) > +++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Tue Feb 24 19:11:29 2015 > @@ -127,16 +127,16 @@ namespace clang { > Decl *MergeWith; > mutable bool Owning; > Decl::Kind DeclKind; > - > + > void operator=(RedeclarableResult &) = delete; > Isn't this (well, the normal copy ctor and copy assignment operator) already deleted by the presence of the move ctor? (speaking of which... I/we/someone should really get around to making " definition of implicit copy constructor/assignment operator for '%s' is deprecated because it has a user-declared thing" a subflag of -Wdeprecated and turning it on for LLVM (& probably at Google too)... ) > - > + > 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; } > > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
