This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Reject calling virtual constexpr functions in pre-c++20
ClosedPublic

Authored by tbaeder on Aug 10 2023, 7:09 AM.

Details

Summary

Create a new getOrCreateFunction() in Context, so we can lazily compile functions when invoking them in CallVirt. This was necessary in the added test case for example.

Also, reject calling virtual constexpr functions in pre-c++20.

Diff Detail

Event Timeline

tbaeder created this revision.Aug 10 2023, 7:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 7:09 AM
tbaeder requested review of this revision.Aug 10 2023, 7:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 7:09 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Aug 10 2023, 10:07 AM
This revision was landed with ongoing or failed builds.Sep 5 2023, 3:34 AM
This revision was automatically updated to reflect the committed changes.