This is an archive of the discontinued LLVM Phabricator instance.

[AST][RecoveryExpr] Fix an assertion crash on openMP.
ClosedPublic

Authored by hokein on May 19 2020, 3:07 AM.

Details

Summary

With recovery expr, it is possible that we have a value-dependent expr
within non-dependent context.

Diff Detail

Event Timeline

hokein created this revision.May 19 2020, 3:07 AM
Herald added a project: Restricted Project. · View Herald Transcript

This seems vaguely reasonable to me, but I don't really know what an OpenMP capture is.

@ABataev, @jdoerfert : Any thoughts or concerns here?
Some context: an expression that contains errors can exist after certain types of sema/parse errors and acts as a placeholder in the AST with unknown semantics, e.g. we often don't know what its type is.
It is modeled as dependent, but its value/type/validity depends on how an the user would correct the error rather than how a template is instantiated.
(This behavior is with the -recovery-ast flag, which will one day be default).

@hokein Callers of isDependentContext() might mike sense to audit for recovery-AST-safety as it gives fewer guarantees than it used to.

This revision is now accepted and ready to land.May 19 2020, 4:07 AM
This revision was automatically updated to reflect the committed changes.