[all-commits] [llvm/llvm-project] 815b00: [clang][OpenMP] Slightly refactor EndOpenMPDSABloc...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Tue Sep 17 13:14:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 815b0046b8998e3b9e7a964608c725eec8e85d8a
      https://github.com/llvm/llvm-project/commit/815b0046b8998e3b9e7a964608c725eec8e85d8a
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2024-09-17 (Tue, 17 Sep 2024)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp

  Log Message:
  -----------
  [clang][OpenMP] Slightly refactor EndOpenMPDSABlock for readability, NFC (#109003)

Change the loop
```
  if (isOpenMPExecutableDirective)
    for (Clause)
      if (Clause is kind1)
        multi
        line
        do
        something1;
      else if (Clause is kind2)
        ...
      ...
```
to
```
  auto do1 = ...do something1...;
  auto do2 = ...do something2...;
  ...

  if (isOpenMPExecutableDirective)
    for (Clause)
      if (Clause is kind1)
        do1();
      else if (Clause is kind2)
        do2();
      ...
    ...
```



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