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

2023-02-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4150724 , @vedgy wrote: > In D143418#4150360 , @aaron.ballman > wrote: > >> So my intuition is that the current behavior works well enough and I doubt >> anyone's going

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

2023-02-24 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D143418#4150360 , @aaron.ballman wrote: > So my intuition is that the current behavior works well enough and I doubt > anyone's going to propose changes to it in the future. So adding the `GlobalOptions` member to `CXIndexOpti

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

2023-02-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4148003 , @vedgy wrote: > In D143418#4147578 , @aaron.ballman > wrote: > >> In D143418#4131156 , @vedgy wrote: >> >>> On second

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

2023-02-23 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D143418#4147578 , @aaron.ballman wrote: > In D143418#4131156 , @vedgy wrote: > >> On second thought, the proposed `clang_getDefaultGlobalOptions()` API >> already offers users a choice

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

2023-02-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4131156 , @vedgy wrote: > In D143418#4125756 , @aaron.ballman > wrote: > >>> 3. `clang_createIndex()` initializes global options based on environment >>> variable values

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

2023-02-15 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D143418#4125756 , @aaron.ballman wrote: >> 3. `clang_createIndex()` initializes global options based on environment >> variable values: >> >> if (getenv("LIBCLANG_BGPRIO_INDEX")) >> CIdxr->setCXGlobalOptFlags(CIdxr->get

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

2023-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4126266 , @vedgy wrote: > `size_t` indeed makes logical sense for this member as that's the return type > of `sizeof`. `size_t` is two times larger than `unsigned` on x86_64, but I > don't think the size of this

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

2023-02-14 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D143418#4125756 , @aaron.ballman wrote: > In D143418#4125098 , @vedgy wrote: > >>> `uint32_t Size; // = sizeof(struct CIndexOptions), used for option >>> versioning` >> >> 1. `uint32_t`

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

2023-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4125098 , @vedgy wrote: >> `uint32_t Size; // = sizeof(struct CIndexOptions), used for option >> versioning` > > 1. `uint32_t` was introduced in C99. Can/should it be used in //Index.h//? > Only built-in `[unsig

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

2023-02-13 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. > `uint32_t Size; // = sizeof(struct CIndexOptions), used for option versioning` `uint32_t` was introduced in C99. Can/should it be used in //Index.h//? Only built-in `[unsigned] (int|long)` types are currently used in this file. Repository: rG LLVM Github Monorepo CH

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

2023-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4123468 , @vedgy wrote: > In D143418#4122821 , @aaron.ballman > wrote: > >>> How about including existing options, which //should// be set in >>> constructor, in the ini

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

2023-02-13 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In 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 l

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

2023-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4120058 , @vedgy wrote: > In D143418#4118905 , @aaron.ballman > wrote: > >> I don't think "tries hard" is a good enough guarantee for where files are >> placed. I'm not

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

2023-02-10 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D143418#4118905 , @aaron.ballman wrote: > I don't think "tries hard" is a good enough guarantee for where files are > placed. I'm not comfortable with the security posture of that approach as it > could potentially leak sensit

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

2023-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143418#4117246 , @vedgy wrote: > In D143418#4116290 , @aaron.ballman > wrote: > >>> So how about a more sincere general solution: setPreferredTempDirPath()? >>> The documentati

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

2023-02-09 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a subscriber: dblaikie. vedgy added a comment. In D143418#4116290 , @aaron.ballman wrote: >> So how about a more sincere general solution: setPreferredTempDirPath()? The >> documentation would say that libclang tries its best to place tempor

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

2023-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: jkorous. aaron.ballman added a comment. In D143418#4111990 , @vedgy wrote: > I hoped to avoid applying an unrelated `git clang-format`'s include > reordering, but the CI fails because of that. Will apply it along with >

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

2023-02-07 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. I hoped to avoid applying an unrelated `git clang-format`'s include reordering, but the CI fails because of that. Will apply it along with changes requested during code review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

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

2023-02-06 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy updated this revision to Diff 495372. vedgy edited the summary of this revision. vedgy added a comment. Address an old inline review comment https://reviews.llvm.org/D139774#inline-1360634 and add a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

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

2023-02-06 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. vedgy requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added projects: clang, clang-tools-extra. TempPCHFile::create() calls llvm::sys::fs::createT