aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Casting.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
commitaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (patch)
treed207b35cfb445636f41204bcfe51f6ca3a94a3ba /llvm/unittests/Support/Casting.cpp
parentb8df4093e4d82c67a419911a46b63482043643e5 (diff)
downloadllvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.zip
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.gz
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.bz2
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/unittests/Support/Casting.cpp')
-rw-r--r--llvm/unittests/Support/Casting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/Casting.cpp b/llvm/unittests/Support/Casting.cpp
index 311fefd..bebb36f 100644
--- a/llvm/unittests/Support/Casting.cpp
+++ b/llvm/unittests/Support/Casting.cpp
@@ -248,11 +248,11 @@ TEST(CastingTest, dyn_cast_value_types) {
TEST(CastingTest, dyn_cast_if_present) {
Optional<T1> empty{};
Optional<T2> F1 = dyn_cast_if_present<T2>(empty);
- EXPECT_FALSE(F1.hasValue());
+ EXPECT_FALSE(F1.has_value());
T1 t1;
Optional<T2> F2 = dyn_cast_if_present<T2>(t1);
- EXPECT_TRUE(F2.hasValue());
+ EXPECT_TRUE(F2.has_value());
T1 *t1Null = nullptr;