libclang does not receive user-defined default header when it is unsaved file on Windows.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
# common
clang version 22.1.6
# summary
Windows and linux has undefined behaviour even on same version of clang.
# step to reproduce
```
# install libclang where cmake is able to grab.
git clone https://talkischeap.work.gd/ae3f/aclspv
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build
./build/Test-c-ae3f-aclspv-test-compiler-run.exe
```
# on linux
> OS: Arch Linux x86_64
> Kernel: Linux 7.0.10-arch1-1
you will able to see following log and process stopping
```
aclspv_compile: 0
output spirv: , 842
```
# on windows (problemetic)
> OS: Windows 11 Education (25H2) x86_64
> Kernel: WIN32_NT 10.0.26200.8457
you will able to see following error log and process stopping.
```
<-> fatal error: 'opencl-c-base.h' file not found
<-> FTAL
...
aclspv_compile: 0
output spirv: , 842
```
with copy-pasting from `src/ocl.h` to `build/opencl-c-base.h`, you will see same behaviour on linux.
that shows libclang on windows does not receive unsaved file for default header.
Contributor guide
Assessment
This issue has not been assessed yet.