This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Implement __builtin_inf() etc.
ClosedPublic

Authored by tbaeder on Jul 15 2023, 6:27 AM.

Diff Detail

Event Timeline

tbaeder created this revision.Jul 15 2023, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2023, 6:27 AM
tbaeder requested review of this revision.Jul 15 2023, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2023, 6:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Tests will come in a later commit.

tbaeder updated this revision to Diff 540774.Jul 16 2023, 3:37 AM
cor3ntin added inline comments.Jul 16 2023, 6:11 AM
clang/lib/AST/Interp/InterpBuiltin.cpp
124

why does that return a bool? you could make it void, and get rid of the if statement

tbaeder added inline comments.Jul 16 2023, 1:39 PM
clang/lib/AST/Interp/InterpBuiltin.cpp
124

No reason other than that all the evaluation functions (also in Interp.h) return bool, even if they always succeed.

cor3ntin accepted this revision.Jul 16 2023, 11:21 PM
cor3ntin added inline comments.
clang/lib/AST/Interp/InterpBuiltin.cpp
124

Yeah, I'm not a fan of returning something for no reason but i buy the consistency argument

This revision is now accepted and ready to land.Jul 16 2023, 11:21 PM
This revision was landed with ongoing or failed builds.Jul 28 2023, 1:50 AM
This revision was automatically updated to reflect the committed changes.