Kazu Hirata
f71ffd3b73
[clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
...
This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to clean up the "using" declarations, #include
"llvm/ADT/Optional.h", etc.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07 20:19:42 -08:00
Kazu Hirata
71f557355d
[clang-tools-extra] Add #include <optional> (NFC)
...
This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07 20:02:20 -08:00
Kazu Hirata
c824db46d4
[clang-tools-extra] Use std::optional instead of None in comments (NFC)
...
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-10 16:59:22 -08:00
Kazu Hirata
7c2b77368f
[clang-tools-extra] Use std::nullopt instead of None in comments (NFC)
...
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-04 17:40:28 -08:00
Kazu Hirata
059a23c0f0
[clang-tools-extra] Use std::nullopt instead of None (NFC)
...
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-03 11:54:50 -08:00
Haojian Wu
bf0e219d04
[pseudo] Use C++17 variant to simplify the DirectiveTree::Chunk class, NFC.
...
Differential Revision: https://reviews.llvm.org/D131396
2022-08-11 14:27:38 +02:00
Kazu Hirata
5413bf1bac
Don't use Optional::hasValue (NFC)
2022-06-20 11:33:56 -07:00
Sam McCall
7dc3c6190e
[pseudo] Strip directives from a token stream
...
This includes only the taken branch of conditional sections.
The API allows for producing a stream for a particular PP branch, which
will be used later for the secondary GLR parses of not-taken branches.
Differential Revision: https://reviews.llvm.org/D123243
2022-05-06 12:15:08 +02:00
Sam McCall
c03d6257c5
[pseudo] Rename DirectiveMap -> DirectiveTree. NFC
...
Addressing comment from previous review
https://reviews.llvm.org/D121165?id=413636#inline-1160757
2022-04-06 21:36:57 +02:00