[qt/clang/llvm]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/clang/llvm
Pushed by mirror-service into branch 'upstream/users/cchen/flang-metadirective-loop-default-none'.
Changed from 3b80cd45daebaa1a898aed97356f8810e954c52f to 640438625d9e46ec6fac78a25821fc552cb0206e
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit f297c090eeda15d4cf848ffe3b9a64ca8b4e22d0 by Chi-Chun, Chen on 21/07/2026 at 20:18..
[flang][OpenMP] Check DEFAULT(NONE) on metadirective loop variants

Flang does not enforce `DEFAULT(NONE)` for variables referenced in a loop
associated with a standalone METADIRECTIVE. Consequently, it accepts invalid
programs when a potentially selectable loop variant specifies DEFAULT(NONE) but
omits a referenced variable from its data-sharing clauses. This change checks the
associated loop for each potentially selectable `DEFAULT(NONE)` variant and
diagnoses missing data-sharing attributes as it does for ordinary OpenMP loop
constructs.

Standalone metadirectives and their associated loops are separate parse-tree
nodes. For example:

```fortran
!$omp metadirective &
!$omp& when(implementation={vendor(llvm)}: &
!$omp& parallel do default(none) shared(n, a)) default(nothing)
do i = 1, n
  a(i) = x
end do
```

Unlike an ordinary `PARALLEL DO`, the loop is not nested under the directive:

```text
METADIRECTIVE
`-- WHEN
    `-- PARALLEL DO DEFAULT(NONE) SHARED(n, a)

DO
`-- a(i) = x
```

Name resolution therefore leaves the variant context before visiting the loop and
does not diagnose the missing data-sharing attribute for `x`.

After associating a metadirective with its loop, validate DEFAULT(NONE) for each
potentially selectable loop variant. Preserve the existing rules for
predetermined and explicit data-sharing attributes, static locals, nested
constructs, specification expressions, and statically inapplicable variants.

Assisted with codex.
https://invent.kde.org/qt/clang/llvm/-/commit/f297c090eeda15d4cf848ffe3b9a64ca8b4e22d0

Git commit 640438625d9e46ec6fac78a25821fc552cb0206e by Chi-Chun, Chen on 21/07/2026 at 20:33..
Diagnose nested FIRSTPRIVATE under DEFAULT(NONE)

A variable listed as FIRSTPRIVATE on a nested TASK is also referenced by the
enclosing construct. If that construct has DEFAULT(NONE), the variable must be
listed in one of its data-sharing clauses.

The metadirective loop checker incorrectly treated nested FIRSTPRIVATE like
PRIVATE and skipped the diagnostic. Exempt only nested PRIVATE variables and
add a regression test.

Assisted with codex.
https://invent.kde.org/qt/clang/llvm/-/commit/640438625d9e46ec6fac78a25821fc552cb0206e
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.