[flang-commits] [flang] [llvm] [Flang] [OpenMP] Add semantic checks for detach clause in task (PR #119172)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu May 1 06:18:37 PDT 2025
================
@@ -3627,40 +3683,45 @@ void OmpStructureChecker::CheckIsVarPartOfAnotherVar(
const parser::CharBlock &source, const parser::OmpObjectList &objList,
llvm::StringRef clause) {
for (const auto &ompObject : objList.v) {
- common::visit(
- common::visitors{
- [&](const parser::Designator &designator) {
- if (const auto *dataRef{
- std::get_if<parser::DataRef>(&designator.u)}) {
- if (IsDataRefTypeParamInquiry(dataRef)) {
+ CheckIsVarPartOfAnotherVar(source, ompObject, clause);
+ }
+}
+
+void OmpStructureChecker::CheckIsVarPartOfAnotherVar(
+ const parser::CharBlock &source, const parser::OmpObject &ompObject,
+ llvm::StringRef clause) {
+ common::visit(
+ common::visitors{
+ [&](const parser::Designator &designator) {
+ if (const auto *dataRef{
+ std::get_if<parser::DataRef>(&designator.u)}) {
+ if (IsDataRefTypeParamInquiry(dataRef)) {
+ context_.Say(source,
+ "A type parameter inquiry cannot appear on the %s "
+ "directive"_err_en_US,
----------------
kparzysz wrote:
Please make message strings be in a single line (here and in other places you've changed). This is to make it easier to find them in the source based on the compiler output.
https://github.com/llvm/llvm-project/pull/119172
More information about the flang-commits
mailing list