[llvm] 20bdb45 - [FileCheck] Remove the last llvm::Optional

Robinson, Paul via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 14:20:37 PST 2022


Sorry, forgot it wouldn't be linkified.
https://github.com/llvm/llvm-project/commit/9408164254d26d5305fe4e0267b668c41c1266ed

MaskRay's commit to convert _most_ of FileCheck.cpp, but
skipped this one place due to errors from MSVC/older GCC.


> -----Original Message-----
> From: David Blaikie <dblaikie at gmail.com>
> Sent: Monday, December 19, 2022 4:58 PM
> To: Robinson, Paul <paul.robinson at sony.com>
> Cc: Benjamin Kramer <benny.kra at googlemail.com>; Benjamin Kramer
> <llvmlistbot at llvm.org>; llvm-commits at lists.llvm.org
> Subject: Re: [llvm] 20bdb45 - [FileCheck] Remove the last llvm::Optional
> 
> On Mon, Dec 19, 2022 at 11:35 AM Robinson, Paul via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> >
> > has the problem reported in 94081642 been addressed?
> 
> what's this number refer to?
> 
> > MSVC and older GCC may report errors...
> >
> >
> > > -----Original Message-----
> > > From: llvm-commits <llvm-commits-bounces at lists.llvm.org> On Behalf Of
> > > Benjamin Kramer via llvm-commits
> > > Sent: Monday, December 19, 2022 2:27 PM
> > > To: llvm-commits at lists.llvm.org
> > > Subject: [llvm] 20bdb45 - [FileCheck] Remove the last llvm::Optional
> > >
> > >
> > > Author: Benjamin Kramer
> > > Date: 2022-12-19T20:22:14+01:00
> > > New Revision: 20bdb4514eb1f1a6cf60af20c2f03a2a45f09976
> > >
> > > URL: https://urldefense.com/v3/__https://github.com/llvm/llvm-
> > >
> project/commit/20bdb4514eb1f1a6cf60af20c2f03a2a45f09976__;!!JmoZiZGBv3RvKR
> > >
> Sx!4PPO1RpxBvy9WH2Tn1prKgLdXpNd8pjZKMgfh69i4ycAQ7ddhNOmMCqU2vygYr1beKk3Zf1
> > > h3Rx07p7J2_lAlVa2sPl7$
> > > DIFF: https://urldefense.com/v3/__https://github.com/llvm/llvm-
> > >
> project/commit/20bdb4514eb1f1a6cf60af20c2f03a2a45f09976.diff__;!!JmoZiZGBv
> > >
> 3RvKRSx!4PPO1RpxBvy9WH2Tn1prKgLdXpNd8pjZKMgfh69i4ycAQ7ddhNOmMCqU2vygYr1beK
> > > k3Zf1h3Rx07p7J2_lAldNK3Sbk$
> > >
> > > 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(
> > >
> > >
> > >
> > > _______________________________________________
> > > llvm-commits mailing list
> > > llvm-commits at lists.llvm.org
> > > https://urldefense.com/v3/__https://lists.llvm.org/cgi-
> > > bin/mailman/listinfo/llvm-
> > >
> commits__;!!JmoZiZGBv3RvKRSx!4PPO1RpxBvy9WH2Tn1prKgLdXpNd8pjZKMgfh69i4ycAQ
> > > 7ddhNOmMCqU2vygYr1beKk3Zf1h3Rx07p7J2_lAlRFuXg1O$
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > https://urldefense.com/v3/__https://lists.llvm.org/cgi-
> bin/mailman/listinfo/llvm-commits__;!!JmoZiZGBv3RvKRSx!4Z0aT1-i19fYNi_R4E-
> MgDo795C_Csslm4A1gYGZa0jHz2IAe8W5KTKkOeYZDNlVhC6bl_h1pLy7Jybqjw$


More information about the llvm-commits mailing list