[PATCH] D139774: [libclang] Add API to set temporary directory location

Igor Kushnir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 01:29:02 PST 2023


vedgy added a comment.

In D139774#4036496 <https://reviews.llvm.org/D139774#4036496>, @aaron.ballman wrote:

> Given that we already have other setters to set global state, I'm less concerned about adding another one. I hadn't realized we already introduced the dangers here. But we should document the expectation that the call be made before creating the index.

There is a difference: `clang_CXIndex_setGlobalOptions()` and `clang_CXIndex_setInvocationEmissionPathOption()` take a `CXIndex` argument and thus can only be called **after** creating an index. So requiring to call `clang_overrideTemporaryDirectory()` before creating an index, plus one more time with `nullptr` argument after disposing of the index, wouldn't be particularly consistent with other setters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139774



More information about the llvm-commits mailing list