r230417 - Make RedeclarableResult's ownership-transferring constructor be a move
Richard Smith
richard-llvm at metafoo.co.uk
Tue Feb 24 17:11:29 PST 2015
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;
-
+
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; }
More information about the cfe-commits
mailing list