This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`.
ClosedPublic

Authored by mboehme on May 23 2023, 4:16 AM.

Details

Summary

This patch adds a test that crashes without the fix.

Diff Detail

Event Timeline

mboehme created this revision.May 23 2023, 4:16 AM
Herald added a project: Restricted Project. · View Herald Transcript
mboehme requested review of this revision.May 23 2023, 4:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 4:16 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ymandel accepted this revision.May 23 2023, 5:44 AM
This revision is now accepted and ready to land.May 23 2023, 5:44 AM
xazax.hun added inline comments.May 24 2023, 7:58 PM
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
5148

Should we also test that the value of the expression is true in the analysis state?

mboehme updated this revision to Diff 525501.May 25 2023, 2:23 AM

Add check that the value of the expression is true.

mboehme marked an inline comment as done.May 25 2023, 2:23 AM
mboehme added inline comments.
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
5148

Good point -- done.

I've also verified that this test continues to trigger the assert-fail if the fix is not present.

This revision was automatically updated to reflect the committed changes.
mboehme marked an inline comment as done.