ioeric accepted this revision.
ioeric added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:33
   std::vector<Token> Result = generateIdentifierTrigrams(Sym.Name);
-  Result.push_back(Token(Token::Kind::Scope, Sym.Scope));
+  Result.emplace_back(Token(Token::Kind::Scope, Sym.Scope));
   return Result;
----------------
Do you still need to spell out the constructor with `emplace_back`?


================
Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:395
   for (; !It.reachedEnd(); It.advance())
-    Result.push_back(std::make_pair(It.peek(), It.consume()));
+    Result.emplace_back(std::make_pair(It.peek(), It.consume()));
   return Result;
----------------
No need for `make_pair` here?


https://reviews.llvm.org/D51528



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to