[all-commits] [llvm/llvm-project] 077940: [flang][openacc] Make OpenACC block construct pars...

Andre Kuhlenschmidt via All-commits all-commits at lists.llvm.org
Wed Mar 26 12:36:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 077940621d2ef1352f0353a58c3130ed6c3034e8
      https://github.com/llvm/llvm-project/commit/077940621d2ef1352f0353a58c3130ed6c3034e8
  Author: Andre Kuhlenschmidt <andre.kuhlenschmidt at gmail.com>
  Date:   2025-03-26 (Wed, 26 Mar 2025)

  Changed paths:
    M flang/lib/Parser/message.cpp
    M flang/lib/Parser/openacc-parsers.cpp
    M flang/test/Driver/debug-parsing-log.f90
    A flang/test/Parser/acc-data-statement.f90
    A flang/test/Parser/acc.f

  Log Message:
  -----------
  [flang][openacc] Make OpenACC block construct parse errors less verbose. (#131042)

This PR does reduces the verbosity of parser errors for OpenACC block
constructs that do not parse correctly because they are missing their
trailing end block directive by:
- Removing the redundant error messages created by parsing 3 different
styles of directive tokens.
- Providing a general mechanism of configuring the max number of
contexts printed for every syntax error.
- Not printing less specific contexts that are at the same location.

Prior to the changes:
```
$ flang -fc1 -fopenacc -fsyntax-only flang/test/Parser/acc-data-statement.f90 2>&1 | tee acc-data-statement.prior.log | wc -l
262
```

[acc-data-statement.prior.log](https://github.com/user-attachments/files/19298165/acc-data-statement.prior.log)

```
$ flang -fc1 -fopenacc -fsyntax-only flang/test/Parser/acc-data-statement.f90 2>&1 | tee acc-data-statement.prior.log | wc -l
73
```

[acc-data-statement.post.log](https://github.com/user-attachments/files/19298181/acc-data-statement.post.log)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list