mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-11 04:06:20 +00:00
[cross-project-tests] Use std::nullopt instead of llvm::None (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
This commit is contained in:
parent
4f81805a3f
commit
13f489e750
@ -9,6 +9,7 @@
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/ADT/ilist.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
#include <optional>
|
||||
|
||||
int Array[] = {1, 2, 3};
|
||||
auto IntPtr = reinterpret_cast<int *>(0xabc);
|
||||
@ -20,7 +21,7 @@ llvm::StringMap<int> StringMap = {{"foo", 123}, {"bar", 456}};
|
||||
llvm::Expected<int> ExpectedValue(8);
|
||||
llvm::Expected<int> ExpectedError(llvm::createStringError({}, ""));
|
||||
llvm::Optional<int> OptionalValue(9);
|
||||
llvm::Optional<int> OptionalNone(llvm::None);
|
||||
llvm::Optional<int> OptionalNone(std::nullopt);
|
||||
llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
|
||||
llvm::SmallString<5> SmallString("foo");
|
||||
llvm::StringRef StringRef = "bar";
|
||||
|
Loading…
x
Reference in New Issue
Block a user