kadircet added a comment.

Thanks, LGTM. Just a question around the order of config vs other mangling.



================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:187
+  // FIXME: remove const_cast once unique_function is const-compatible.
+  for (auto &Edit : const_cast<Config &>(Config::current()).CompileFlags.Edits)
+    Edit(Cmd);
----------------
what's the rationale behind applying this before any other mangling?

I can see that the rest of the mangling happens to make sure clangd works 
out-of-the-box for "more" users, so should be safe to apply as a final step.
But on the other hand, applying config after those would give the user full 
control over the final command, which I believe is equally important.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82606/new/

https://reviews.llvm.org/D82606



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

Reply via email to