This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Implement bitwise and operations
ClosedPublic

Authored by tbaeder on Oct 1 2022, 12:24 AM.

Diff Detail

Event Timeline

tbaeder created this revision.Oct 1 2022, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2022, 12:24 AM
tbaeder requested review of this revision.Oct 1 2022, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2022, 12:24 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tbaeder updated this revision to Diff 464478.Oct 1 2022, 12:32 AM
shafik added inline comments.Oct 3 2022, 12:48 PM
clang/lib/AST/Interp/Integral.h
220

Maybe bitAnd?

clang/test/AST/Interp/literals.cpp
269

Also 0 & something else should be 0.

I wonder if there is any value in using binary literals.

tbaeder updated this revision to Diff 464902.Oct 4 2022, 12:42 AM
tbaeder marked 2 inline comments as done.
shafik accepted this revision.Oct 4 2022, 7:47 AM

LGTM

clang/test/AST/Interp/literals.cpp
270

Why gimme(12) and not just 12?

This revision is now accepted and ready to land.Oct 4 2022, 7:47 AM
tbaeder added inline comments.Oct 4 2022, 8:28 AM
clang/test/AST/Interp/literals.cpp
270

I just thought it might be useful to test something that's not a literal.

This revision was landed with ongoing or failed builds.Oct 14 2022, 5:01 AM
This revision was automatically updated to reflect the committed changes.