[all-commits] [llvm/llvm-project] b09701: [clang][OpenMP] Fix teams nesting of region check ...

Mike Rice via All-commits all-commits at lists.llvm.org
Mon Jun 24 13:32:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b097018fdafe61f1fe10337a71f56e5386930d54
      https://github.com/llvm/llvm-project/commit/b097018fdafe61f1fe10337a71f56e5386930d54
  Author: Mike Rice <michael.p.rice at intel.com>
  Date:   2024-06-24 (Mon, 24 Jun 2024)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/OpenMP/Inputs/nesting_of_regions.cpp

  Log Message:
  -----------
  [clang][OpenMP] Fix teams nesting of region check (#94806)

The static verifier flagged dead code in the check since the loop will
only execute once and never reach the iterator increment.

The loop needs to iterate twice to correctly diagnose when a statement
is after the teams.

Since there are two iterations again, reset the iterator to the first
teams directive when the double teams case is seen so the diagnostic can
report both locations.



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