[PATCH] D150880: [RFC, FileCheck, 3/4] Allow AP value for numeric expressions

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 17:49:50 PDT 2023


arichardson accepted this revision.
arichardson added a comment.
This revision is now accepted and ready to land.

Looks good to me. Sorry for the delay.



================
Comment at: llvm/lib/FileCheck/FileCheck.cpp:252
+    Expected<ExpressionValue> MaybeResult =
+        EvalBinop(ExpressionValue(LeftOp), ExpressionValue(RightOp), Overflow);
+    if (!MaybeResult)
----------------
thopre wrote:
> arichardson wrote:
> > The API might be a bit nicer if evalbinop did the widening of apints?
> EvalBinop is a function pointer to one of the expr* functions above. That would mean adding that logic in all those functions. This code here is in a single place instead. I could split it out into a separate function if you prefer?
Ah yes of course. I don't really mind, so this should be fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150880/new/

https://reviews.llvm.org/D150880



More information about the llvm-commits mailing list