[flang][OpenMP] Add semantic check to allow only loop iteration variables in a `linea...
authorArnamoy Bhattacharyya <arnamoy.bhattacharyya@huawei.com>
Fri, 4 Jun 2021 21:17:49 +0000 (17:17 -0400)
committerArnamoy Bhattacharyya <arnamoy.bhattacharyya@huawei.com>
Fri, 4 Jun 2021 21:32:25 +0000 (17:32 -0400)
commitf2622a150adea31290daee0d04bf385d387fbc04
tree005ba747787bce2bba57452ef0134b8fe96a42c0
parent33ba8bd2c942062731a17e1b864b5953e3d79f1a
[flang][OpenMP] Add semantic check to allow only loop iteration variables in a `linear` clause within `distribute` construct.

Implement the following semantic check:

"A list item may not appear in a linear clause, unless it is the loop iteration variable."

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D100224
flang/lib/Semantics/check-omp-structure.cpp
flang/lib/Semantics/check-omp-structure.h
flang/test/Semantics/omp-linear-iter.f90 [new file with mode: 0644]