From aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jun 2022 11:55:57 -0700 Subject: Don't use Optional::hasValue (NFC) --- clang/unittests/Tooling/RefactoringTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/unittests/Tooling/RefactoringTest.cpp') 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"; } -- cgit v1.1