[clang] llvm::Optional::value => operator*/operator->
authorFangrui Song <i@maskray.me>
Sat, 17 Dec 2022 08:10:45 +0000 (08:10 +0000)
committerFangrui Song <i@maskray.me>
Sat, 17 Dec 2022 08:10:45 +0000 (08:10 +0000)
commit1e6adbadc77517037cb0723df26510fb7a8457ec
tree771789651b49fa7d17f4472c5419140ded7b0f0e
parent4501133d96b6959b18e9f7d4776c171b22846f4a
[clang] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The
call sites block std::optional migration.

This makes `ninja check-clang` work in the absence of llvm::Optional::value.
clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp
clang/lib/Analysis/FlowSensitive/DebugSupport.cpp
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
clang/tools/libclang/CIndex.cpp
clang/unittests/Lex/HeaderSearchTest.cpp