[all-commits] [llvm/llvm-project] 22994e: [OpenACC][Sema] Implement warning for non-effectiv...

Erich Keane via All-commits all-commits at lists.llvm.org
Wed Jul 16 11:06:02 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22994edb5fd71198c48670255c979fcc962930a1
      https://github.com/llvm/llvm-project/commit/22994edb5fd71198c48670255c979fcc962930a1
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaOpenACC.cpp
    A clang/test/SemaOpenACC/private_firstprivate_reduction_required_ops.cpp

  Log Message:
  -----------
  [OpenACC][Sema] Implement warning for non-effective 'private' (#149004)

A 'private' variable reference needs to have a default constructor and a
destructor, else we cannot properly emit them in codegen. This patch
adds a warning-as-default-error to diagnose this.

We'll have to do something similar for firstprivate/reduction, however
it isn't clear whether we could skip the check for default-constructor
for those two (they still need a destructor!). Depending on how we
intend to create them (and we probably have to figure this out?), we
could either require JUST a copy-constructor (then make the init section
    just the alloca, and the copy-ctor be the 'copy' section), OR they
require a default-constructor + copy-assignment.



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