[clangd] Remove the const specifier of the takeSymbol method
authorHaojian Wu <hokein@google.com>
Wed, 13 Dec 2017 12:39:06 +0000 (12:39 +0000)
committerHaojian Wu <hokein@google.com>
Wed, 13 Dec 2017 12:39:06 +0000 (12:39 +0000)
otherwise we will copy an object.

llvm-svn: 320574

clang-tools-extra/clangd/index/SymbolCollector.h

index a9269a2703f5e00b048e50d7803ac3f874618faa..a964942af56e7c3803b2b0d63432d2cb101301c9 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   void finish() override;
 
-  SymbolSlab takeSymbols() const { return std::move(Symbols); }
+  SymbolSlab takeSymbols() { return std::move(Symbols); }
 
 private:
   // All Symbols collected from the AST.