]> granicus.if.org Git - clang/commitdiff
[ASTReader] Use real move semantics instead of emulating them in the copy ctor.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 6 Aug 2016 12:45:16 +0000 (12:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 6 Aug 2016 12:45:16 +0000 (12:45 +0000)
No functionality change intended.

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

lib/Serialization/ASTReaderDecl.cpp

index 7bbc4b129fc938d085786cd8218bf558d7b2e00a..88a08560e35b2757ef7c028bdaa912b103efdb86 100644 (file)
@@ -170,12 +170,12 @@ namespace clang {
       ASTReader &Reader;
       NamedDecl *New;
       NamedDecl *Existing;
-      mutable bool AddResult;
+      bool AddResult;
 
       unsigned AnonymousDeclNumber;
       IdentifierInfo *TypedefNameForLinkage;
 
-      void operator=(FindExistingResult&) = delete;
+      void operator=(FindExistingResult &&) = delete;
 
     public:
       FindExistingResult(ASTReader &Reader)
@@ -189,7 +189,7 @@ namespace clang {
             AnonymousDeclNumber(AnonymousDeclNumber),
             TypedefNameForLinkage(TypedefNameForLinkage) {}
 
-      FindExistingResult(const FindExistingResult &Other)
+      FindExistingResult(FindExistingResult &&Other)
           : Reader(Other.Reader), New(Other.New), Existing(Other.Existing),
             AddResult(Other.AddResult),
             AnonymousDeclNumber(Other.AnonymousDeclNumber),