[PATCH] D155367: [clang][Interp] Implement __builtin_inf() etc.

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 16 23:21:37 PDT 2023


cor3ntin accepted this revision.
cor3ntin added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:119
 
+static bool interp__builtin_inf(InterpState &S, CodePtr OpPC,
+                                const InterpFrame *Frame, const Function *F) {
----------------
tbaeder wrote:
> cor3ntin wrote:
> > why does that return a bool? you could make it void, and get rid of the if statement
> No reason other than that all the evaluation functions (also in `Interp.h`) return `bool`, even if they always succeed.
Yeah, I'm not a fan of returning something for no reason but i buy the consistency argument


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

https://reviews.llvm.org/D155367



More information about the cfe-commits mailing list