[llvm] 20bdb45 - [FileCheck] Remove the last llvm::Optional
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 11:27:29 PST 2022
Author: Benjamin Kramer
Date: 2022-12-19T20:22:14+01:00
New Revision: 20bdb4514eb1f1a6cf60af20c2f03a2a45f09976
URL: https://github.com/llvm/llvm-project/commit/20bdb4514eb1f1a6cf60af20c2f03a2a45f09976
DIFF: https://github.com/llvm/llvm-project/commit/20bdb4514eb1f1a6cf60af20c2f03a2a45f09976.diff
LOG: [FileCheck] Remove the last llvm::Optional
It doesn't seem necessary and it's blocking std::optional.
Added:
Modified:
llvm/lib/FileCheck/FileCheck.cpp
Removed:
################################################################################
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index 119d369747bc..ec963c2de45b 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/FileCheck/FileCheck.cpp
@@ -695,14 +695,14 @@ Pattern::parseCallExpr(StringRef &Expr, StringRef FuncName,
Expr = Expr.ltrim(SpaceChars);
assert(Expr.startswith("("));
- auto OptFunc = StringSwitch<Optional<binop_eval_t>>(FuncName)
+ auto OptFunc = StringSwitch<binop_eval_t>(FuncName)
.Case("add", operator+)
.Case("div", operator/)
.Case("max", max)
.Case("min", min)
.Case("mul", operator*)
.Case("sub", operator-)
- .Default(std::nullopt);
+ .Default(nullptr);
if (!OptFunc)
return ErrorDiagnostic::get(
More information about the llvm-commits
mailing list