[all-commits] [llvm/llvm-project] ee67f7: Fix error caused by reference to local binding (#1...

Arvind Sudarsanam via All-commits all-commits at lists.llvm.org
Fri Aug 1 21:57:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee67f78776d0af64bc27cabcca62883f7a698467
      https://github.com/llvm/llvm-project/commit/ee67f78776d0af64bc27cabcca62883f7a698467
  Author: Arvind Sudarsanam <arvind.sudarsanam at intel.com>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M llvm/lib/Frontend/Offloading/PropertySet.cpp

  Log Message:
  -----------
  Fix error caused by reference to local binding (#151789)

This change fixes one of the failures in
https://github.com/llvm/llvm-project/pull/147321

Following code snippet:
`
for (const auto &[CategoryName, PropSet] : PSRegistry) {
        J.attributeObject(CategoryName, [&] {
                   for (const auto &[PropName, PropVal] : PropSet) {
`
causes a build warning that is emitted as an error.
error: reference to local binding 'PropSet' declared in enclosing lambda
expression

This is resolved by capturing PropSet in a local variable.

Thanks

Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam at intel.com>



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