This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Visit Logical-not operand as bool
ClosedPublic

Authored by tbaeder on Aug 5 2023, 9:40 PM.

Details

Summary

The invBool op here expects a bool operand, but in C, the operand might be of a different type (usually int).

Diff Detail

Event Timeline

tbaeder created this revision.Aug 5 2023, 9:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2023, 9:40 PM
tbaeder requested review of this revision.Aug 5 2023, 9:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2023, 9:40 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Aug 7 2023, 6:16 AM

LGTM with a testing request.

clang/test/AST/Interp/c.c
15–16

These tests should also work in C++.

This revision is now accepted and ready to land.Aug 7 2023, 6:16 AM
This revision was landed with ongoing or failed builds.Sep 15 2023, 1:13 AM
This revision was automatically updated to reflect the committed changes.