This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Fix bug in handling of `return` statements.
ClosedPublic

Authored by ymandel on Dec 20 2022, 1:05 PM.

Details

Summary

The handling of return statements, added in support of context-sensitive
analysis, has a bug relating to functions that return reference
types. Specifically, interpretation of such functions can result in a crash from
a bad cast. This patch fixes the bug and guards all of that code with the
context-sensitive option, since there's no reason to execute at all when
context-sensitive analysis is off.

Diff Detail

Event Timeline

ymandel created this revision.Dec 20 2022, 1:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
ymandel requested review of this revision.Dec 20 2022, 1:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2022, 1:05 PM
xazax.hun accepted this revision.Dec 20 2022, 2:14 PM
This revision is now accepted and ready to land.Dec 20 2022, 2:14 PM
gribozavr2 accepted this revision.Dec 20 2022, 3:36 PM
This revision was landed with ongoing or failed builds.Dec 22 2022, 6:42 AM
This revision was automatically updated to reflect the committed changes.