aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/RefactoringTest.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 /clang/unittests/Tooling/RefactoringTest.cpp
parentb8df4093e4d82c67a419911a46b63482043643e5 (diff)
downloadllvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.zip
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.gz
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.bz2
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'clang/unittests/Tooling/RefactoringTest.cpp')
-rw-r--r--clang/unittests/Tooling/RefactoringTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/Tooling/RefactoringTest.cpp b/clang/unittests/Tooling/RefactoringTest.cpp
index c71a724..f0edff6 100644
--- a/clang/unittests/Tooling/RefactoringTest.cpp
+++ b/clang/unittests/Tooling/RefactoringTest.cpp
@@ -118,18 +118,18 @@ static bool checkReplacementError(llvm::Error &&Error,
OS << "Unexpected error code: " << int(RE.get()) << "\n";
if (ExpectedExisting != RE.getExistingReplacement()) {
OS << "Expected Existing != Actual Existing.\n";
- if (ExpectedExisting.hasValue())
+ if (ExpectedExisting)
OS << "Expected existing replacement: " << ExpectedExisting->toString()
<< "\n";
- if (RE.getExistingReplacement().hasValue())
+ if (RE.getExistingReplacement())
OS << "Actual existing replacement: "
<< RE.getExistingReplacement()->toString() << "\n";
}
if (ExpectedNew != RE.getNewReplacement()) {
OS << "Expected New != Actual New.\n";
- if (ExpectedNew.hasValue())
+ if (ExpectedNew)
OS << "Expected new replacement: " << ExpectedNew->toString() << "\n";
- if (RE.getNewReplacement().hasValue())
+ if (RE.getNewReplacement())
OS << "Actual new replacement: " << RE.getNewReplacement()->toString()
<< "\n";
}