[PATCH] D143418: [libclang] Add API to set preferred temp dir path

Igor Kushnir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 13 09:41:32 PST 2023


vedgy added a comment.

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

>> How about including existing options, which //should// be set in constructor, in the initial struct version and deprecating the corresponding setters?
>
> I think that makes a lot of sense.

How to deprecate the setters? Add `DEPRECATED` in the documentations as is already done in two places in //Index.h//?

>>   `const char *preferredTempDirPath;`
>
> In terms of documenting the structure, should we document this member as only impacting preamble files currently, should we rename this to be preamble-path specific, or should we try to use this preferred path in all the places we need the temp directory?
>
> (I lean towards renaming to preamble-path specific -- then users don't have the problem of upgrading to a newer CIndex potentially changing the behavior of where non-preamble files are stored, and we don't have to do the work up-front to audit other temp file uses.)

Looks like an imperfect general implementation is unacceptable. So I'll rename this data member to `PreambleStoragePath`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143418



More information about the cfe-commits mailing list