OpenMP/C++: Fix trait-selector handling for 'declare variant' with 'simd' construct
Correctly handles 'simd' construct in OpenMP 'declare variant' for C++, resolving issues with trait-selectors.
This change fixes how OpenMP’s ‘declare variant’ directive handles the ‘simd’ construct in C++. Previously, the ‘simd’ trait was recognized but not properly added to the variant declaration, preventing it from being used. The fix ensures trait-selectors are correctly applied, allowing variants with the ‘simd’ construct to be recognized and used as intended.
In Details
The omp_declare_variant_finalize_one function in cp/decl.cc previously returned early after processing the 'simd' clause, neglecting to attach the associated trait-selectors to the declaration. This commit removes that early return, allowing the trait-selectors to be correctly associated with the variant, addressing issues seen in C++'s handling of 'simd' constructs within declare variant.