This is an archive of the discontinued LLVM Phabricator instance.

[AST] Fix crash in evaluation of OpaqueExpr in Clangd
ClosedPublic

Authored by ilya-biryukov on Aug 28 2023, 6:50 AM.

Details

Summary

The code mistakenly returns the value as evaluated whenever the
temporary is allocated, but not yet evaluated.

I could only reproduce in Clangd and could not come up with an example
that would crash the compiler. Clangd runs more evaluations for hover
than the language would allow.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Aug 28 2023, 6:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2023, 6:50 AM
Herald added a subscriber: arphaman. · View Herald Transcript
ilya-biryukov requested review of this revision.Aug 28 2023, 6:50 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 28 2023, 6:50 AM
kadircet accepted this revision.Aug 28 2023, 7:53 AM
This revision is now accepted and ready to land.Aug 28 2023, 7:53 AM
This revision was landed with ongoing or failed builds.Aug 28 2023, 8:11 AM
This revision was automatically updated to reflect the committed changes.