MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.72k stars 254 forks source link

[SEMA_MANAGER] fix missing PrecompiledPreamble::Build parameter #943

Closed wafgo closed 11 months ago

wafgo commented 1 year ago

since llvm commit cc929590ad305f0d068709c7c7999f5fc6118dc9 (CommitDate: Tue Mar 7 08:25:38 2023 -0500) PrecompiledPreamble::Build() has an additional parameter for the default temporary path.

This introduced change breaks the ccls Build. This commit fixes it by checking the CINDEX_VERSION_MAJOR and CINDEX_VERSION_MINOR, and if the version is above 0.63 adds this path to nothing, which bahaves as the previous version according to the code commets.

This is kind of ugly but I don't know a cleaner solution.

MaskRay commented 11 months ago

Thank you for the PR. Commit ba38e13b93de1e8787b7e8a22b9a00d35b2b40f2 should be sufficient.