[all-commits] [llvm/llvm-project] 26cc6f: [OpenACC] Implement 'break' and 'continue' errors ...

Erich Keane via All-commits all-commits at lists.llvm.org
Thu Feb 22 09:09:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26cc6f126a3b25644c595b3a5a0417b1e1ab42a8
      https://github.com/llvm/llvm-project/commit/26cc6f126a3b25644c595b3a5a0417b1e1ab42a8
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Scope.h
    M clang/lib/Parse/ParseOpenACC.cpp
    M clang/lib/Sema/Scope.cpp
    M clang/lib/Sema/SemaStmt.cpp
    A clang/test/SemaOpenACC/no-branch-in-out.c

  Log Message:
  -----------
  [OpenACC] Implement 'break' and 'continue' errors for Compute Cnstrcts (#82543)

OpenACC3.3 2.5.4 says: "A program may not branch into or out of a
compute construct". While some of this restriction isn't particularly
checkable, 'break' and 'continue' are possible and pretty trivial, so
this patch implements those limitations.

It IS unclear in the case of a 'break' in a 'switch' what should happen
(an antagonistic reading of the standard would prevent it from
 appearing), however we're choosing to special-case the break-in-switch
to ensure that this works (albeit, a 'parallel' directive on a 'switch'
isn't particularly useful, though permitted).

Future implementations of this rule will be in a follow-up patch.



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