This is an archive of the discontinued LLVM Phabricator instance.

Fix assert on the variable which is used in omp clause is not marked as used
ClosedPublic

Authored by jyu2 on May 3 2021, 12:22 PM.

Details

Summary

The problem only happens with constexpr variable, for constexpr variable,
variable is not marked during parser expression. This is because compiler
might find some var's associate expressions may not actully an odr-used
later, the Var get kept in MaybeODRUseExprs, in normal case, at end of
process fullExpr, the variable will be mark during the call to
CleanupVarDeclMarking(). Since we are processing expression of OpenMP
clauses, and the ActOnFinishFullExpr is not getting called that casue
variable is not get marked.

One way to fix this is to call CleanupVarDeclMarking() at in EndOpenMPClause
for each omp directive.

This to fix https://bugs.llvm.org/show_bug.cgi?id=50206

Diff Detail

Event Timeline

jyu2 requested review of this revision.May 3 2021, 12:22 PM
jyu2 created this revision.
This revision is now accepted and ready to land.May 3 2021, 12:50 PM