Open kateinoigakukun opened 1 year ago
This is reproducible without using Swift. Moved the issue to Apple's LLVM fork.
clang -x objective-c++-header -index-store-path . -c check/include/B.h -MD -MT dependencies -o Prefix.pch.gch -isysroot {sdk path} -fmodules
Description
Clang thread crashes while loading C++ headers including
std::optional
in a little bit complex structure.Steps to reproduce
Here is a minimum reproducible project. The include graph consists of
A.h -> C.h
B.h -> C.h
and A and B contain use ofstd::optional
. This happens only with macOS's libc++ but doesn't with libstdc++. (Not tested with libc++ on Linux)check.zip
Expected behavior
Compilation succeeds without crash
Environment