Page MenuHomePhabricator

[LLVMFrontend][openacc] Add basic unit tests for functions in LLVMFrontendOpenACC
ClosedPublic

Authored by clementval on Nov 17 2020, 11:34 AM.

Details

Summary

Add unit tests for functions in LLVMFrontendOpenACC. As notice in D91470 these functions were not tested
as well as the ones for OpenMP (D91643). This patch add tests for the OpenACC part.

Diff Detail

Event Timeline

clementval created this revision.Nov 17 2020, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2020, 11:34 AM
clementval requested review of this revision.Nov 17 2020, 11:34 AM
clementval edited reviewers, added: Meinersbur; removed: clementval.Nov 17 2020, 11:46 AM
Meinersbur added inline comments.Nov 17 2020, 2:49 PM
llvm/unittests/Frontend/OpenACCTest.cpp
20

Since this array is never modified, use a plain old array for this, which doesn't need a static constructor:

static const Clause allClauses[] = ...
67–72

This fixup doesn't do anything, you can just used the non-fixup versions ('TEST(..)' instead of TEST_F)

220

std::initializer_list is unusual for non-constructors. Use ArrayRef?

clementval marked 3 inline comments as done.

Address review comments

@Meinersbur Thanks for the review. Just updated the patch.

llvm/unittests/Frontend/OpenACCTest.cpp
67–72

Thanks for the tip.

@Meinersbur Are the changes fine for you?

Meinersbur accepted this revision.Dec 2 2020, 11:16 AM

LGTM.

Sorry for the wait. Phabricator did not send me notifications for the all the updates. Anyone has an idea why?

This revision is now accepted and ready to land.Dec 2 2020, 11:16 AM
This revision was landed with ongoing or failed builds.Dec 3 2020, 8:27 AM
This revision was automatically updated to reflect the committed changes.