[PATCH] D41730: [clangd] Use ToolExecutor to write the global-symbol-builder tool.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 02:54:31 PST 2018

ioeric added inline comments.

Comment at: clangd/index/SymbolYAML.cpp:140
   llvm::yaml::Output Yout(OS);
   for (Symbol S : Symbols) // copy: Yout<< requires mutability.
     Yout<< S;
hokein wrote:
> The function could be simplified by using the SymbolToYAML below.
> ```
> std::string Str;
> for (const Symbol& S : Symbols) {
>    Str += SymbolToYAML(S);
> }
> ```
This saves two lines of code but would regress the performance, so I am inclined to the current approach.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list