Page MenuHomePhabricator

[Clang][OpenMP] Add static version of getSingleClause<ClauseT>. NFC.
ClosedPublic

Authored by Meinersbur on Jun 3 2021, 9:08 PM.

Details

Summary

The current method getSingleClause requires an instance of OMPExecutableDirective to be called. Introduce a static version taking a list of clauses as argument instead that can be used during parsing/Sema before any OMPExecutableDirective has been created.

This is the same approach as taken for getClausesOfKind for getting more more than a single clause of a type which also has a method and static version. NFC patch extracted out of D99459 by request.

Diff Detail

Event Timeline

Meinersbur created this revision.Jun 3 2021, 9:08 PM
Meinersbur requested review of this revision.Jun 3 2021, 9:08 PM
Herald added a project: Restricted Project. · View Herald Transcript
Meinersbur updated this revision to Diff 349762.Jun 3 2021, 9:10 PM
Meinersbur edited the summary of this revision. (Show Details)

Add context

Meinersbur retitled this revision from [Clang][OpenMP] Add static version of getSingleClause<ClauseT> NFC. to [Clang][OpenMP] Add static version of getSingleClause<ClauseT>. NFC..
This revision is now accepted and ready to land.Jun 4 2021, 4:57 AM