sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land.
This raises the question "is it safe to move functionality from CommandMangler to buildCompilerInvocation for convenience, are they always called on the same codepaths?" I think from our brief investigation the answer is yes, but: - this expectation should probably be documented on CommandMangler and/or buildCompilerInvocation - *neither* of them are called when background indexing, which should probably be a fixme on the static indexer ================ Comment at: clang-tools-extra/clangd/CompileCommands.cpp:225 + auto It = llvm::find(Cmd, "--"); + for (std::string &Arg : ToAppend) + Cmd.insert(It++, std::move(Arg)); ---------------- oops, might have left this comment on the wrong patch use range insert to save shuffling the tail over and over and std::make_move_iterator() to avoid copies? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106562/new/ https://reviews.llvm.org/D106562 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits