This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix a constant evaluator crash on a NULL-type expr.
ClosedPublic

Authored by hokein on Apr 25 2022, 6:45 AM.

Diff Detail

Event Timeline

hokein created this revision.Apr 25 2022, 6:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 6:45 AM
hokein requested review of this revision.Apr 25 2022, 6:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 6:45 AM
sammccall accepted this revision.Apr 25 2022, 8:01 AM

This is a reasonable immediate fix, but creating null-typed expressions that live *outside* the recoveryexpr seems scary, and likely to violate expected invariants elsewhere too...

This revision is now accepted and ready to land.Apr 25 2022, 8:01 AM

This is a reasonable immediate fix, but creating null-typed expressions that live *outside* the recoveryexpr seems scary, and likely to violate expected invariants elsewhere too...

Yeah, the fundamental issue is that we create a null-typed expression (ParenListExpr) outside a template context, which is similar to our prior case where we have a dependent expression outside a template context. Perhaps it violates invariants in other places as well, but this is the first time.

This revision was landed with ongoing or failed builds.Apr 26 2022, 1:23 AM
This revision was automatically updated to reflect the committed changes.