[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Sat May 9 09:14:42 PDT 2026
================
@@ -772,6 +772,10 @@ OpenMP Support
- Added support for ``transparent`` clause in task and taskloop directives.
- Added support for ``use_device_ptr`` clause to accept an optional
``fallback`` modifier (``fb_nullify`` or ``fb_preserve``) with OpenMP >= 61.
+- Added support for C++17 structured bindings in OpenMP regions. Structured
----------------
alexey-bataev wrote:
'C++17 structured bindings in OpenMP regions' is misleading: structured bindings have always worked in OpenMP regions, and the diagnostic this PR replaces (`ext_capture_binding`) calls capturing them 'a C++20 extension'. Reword to: 'Added support for capturing structured bindings in OpenMP regions (C++20; warned as an extension in C++17).' Also, the 'will produce a compilation error' claim is wrong as currently implemented - tuple-like bindings hit `llvm_unreachable` in CodeGen and crash the compiler instead of producing a diagnostic.
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list