This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP]Fix parsing of OpenMP directive nested in a metadirective
ClosedPublic

Authored by mikerice on Feb 14 2022, 11:58 AM.

Details

Summary

Currently any directives inside the associated statement of the metadirective would be parsed as a metadirective and fail. This change just resets the variable before the associated statement is parsed.

It's not clear to me why ReadDirectiveWithinMetadirective is a static instead of a default parameter to ParseOpenMPDeclarativeOrExecutableDirective. That seems to work too if we like it better.

Diff Detail

Event Timeline

mikerice created this revision.Feb 14 2022, 11:58 AM
mikerice requested review of this revision.Feb 14 2022, 11:58 AM

Could you try to make it a param, if possible?

Or at least a static member of a class

mikerice updated this revision to Diff 408598.Feb 14 2022, 1:36 PM

Use a parameter for ReadDirectiveWithinMetadirective.

This revision is now accepted and ready to land.Feb 14 2022, 1:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 4:33 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript