This patch aims to fully support this change from OpenMP 4.5 to 5.0:
The to and from clauses on the target update construct (see Section 2.12.6 on page 176), the depend clause on task generating constructs (see Section 2.17.11 on page 255), and the map clause (see Section 2.19.7.1 on page 315) were extended to allow any lvalue expression as a list item for C/C++.
Specifically, support is added for:
- calling functions which return references/constexprs
- cast expressions as part of a larger lvalue expression
- expressions with the ternary Elvis operators (A ? B : C and A ?: C)
This patch modifies Sema to accept such expressions. A few small changes in CodeGen were required to avoid asserts, but CodeGen appeared to already handle such expressions correctly.
I don't think it should always return true. What about map(s.foo) where foo is a member function?