r365334 - [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 08:45:27 PDT 2019
Author: abataev
Date: Mon Jul 8 08:45:24 2019
New Revision: 365334
URL: http://llvm.org/viewvc/llvm-project?rev=365334&view=rev
Log:
[OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
NFC.
Modified:
cfe/trunk/test/OpenMP/allocate_allocator_messages.cpp
cfe/trunk/test/OpenMP/atomic_messages.c
cfe/trunk/test/OpenMP/atomic_messages.cpp
cfe/trunk/test/OpenMP/cancel_if_messages.cpp
cfe/trunk/test/OpenMP/cancel_messages.cpp
cfe/trunk/test/OpenMP/critical_messages.cpp
cfe/trunk/test/OpenMP/declare_reduction_messages.c
cfe/trunk/test/OpenMP/declare_reduction_messages.cpp
cfe/trunk/test/OpenMP/distribute_collapse_messages.cpp
cfe/trunk/test/OpenMP/distribute_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_copyin_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_default_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_if_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_private_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_shared_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/distribute_private_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_misc_messages.c
cfe/trunk/test/OpenMP/distribute_simd_private_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/flush_messages.cpp
cfe/trunk/test/OpenMP/for_collapse_messages.cpp
cfe/trunk/test/OpenMP/for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/for_linear_messages.cpp
cfe/trunk/test/OpenMP/for_loop_messages.cpp
cfe/trunk/test/OpenMP/for_misc_messages.c
cfe/trunk/test/OpenMP/for_private_messages.cpp
cfe/trunk/test/OpenMP/for_reduction_messages.cpp
cfe/trunk/test/OpenMP/for_schedule_messages.cpp
cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/for_simd_misc_messages.c
cfe/trunk/test/OpenMP/for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/master_messages.cpp
cfe/trunk/test/OpenMP/ordered_messages.cpp
cfe/trunk/test/OpenMP/parallel_copyin_messages.cpp
cfe/trunk/test/OpenMP/parallel_default_messages.cpp
cfe/trunk/test/OpenMP/parallel_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_copyin_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_default_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_if_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_linear_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_misc_messages.c
cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_private_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_copyin_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_default_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_if_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c
cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/parallel_if_messages.cpp
cfe/trunk/test/OpenMP/parallel_messages.cpp
cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_private_messages.cpp
cfe/trunk/test/OpenMP/parallel_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_copyin_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_default_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_if_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_misc_messages.c
cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_private_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_shared_messages.cpp
cfe/trunk/test/OpenMP/parallel_shared_messages.cpp
cfe/trunk/test/OpenMP/requires_messages.cpp
cfe/trunk/test/OpenMP/sections_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/sections_misc_messages.c
cfe/trunk/test/OpenMP/sections_private_messages.cpp
cfe/trunk/test/OpenMP/sections_reduction_messages.cpp
cfe/trunk/test/OpenMP/simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/simd_linear_messages.cpp
cfe/trunk/test/OpenMP/simd_loop_messages.cpp
cfe/trunk/test/OpenMP/simd_misc_messages.c
cfe/trunk/test/OpenMP/simd_private_messages.cpp
cfe/trunk/test/OpenMP/simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/single_copyprivate_messages.cpp
cfe/trunk/test/OpenMP/single_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/single_misc_messages.c
cfe/trunk/test/OpenMP/single_private_messages.cpp
cfe/trunk/test/OpenMP/target_data_device_messages.cpp
cfe/trunk/test/OpenMP/target_data_if_messages.cpp
cfe/trunk/test/OpenMP/target_data_messages.c
cfe/trunk/test/OpenMP/target_data_use_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_depend_messages.cpp
cfe/trunk/test/OpenMP/target_device_messages.cpp
cfe/trunk/test/OpenMP/target_enter_data_depend_messages.cpp
cfe/trunk/test/OpenMP/target_enter_data_device_messages.cpp
cfe/trunk/test/OpenMP/target_enter_data_if_messages.cpp
cfe/trunk/test/OpenMP/target_enter_data_map_messages.c
cfe/trunk/test/OpenMP/target_enter_data_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_exit_data_depend_messages.cpp
cfe/trunk/test/OpenMP/target_exit_data_device_messages.cpp
cfe/trunk/test/OpenMP/target_exit_data_if_messages.cpp
cfe/trunk/test/OpenMP/target_exit_data_map_messages.c
cfe/trunk/test/OpenMP/target_exit_data_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_if_messages.cpp
cfe/trunk/test/OpenMP/target_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_map_messages.cpp
cfe/trunk/test/OpenMP/target_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_depend_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_default_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_depend_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_device_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_if_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_linear_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_map_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_misc_messages.c
cfe/trunk/test/OpenMP/target_parallel_for_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_num_threads_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_ordered_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_private_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_default_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_depend_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_device_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_if_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_map_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_misc_messages.c
cfe/trunk/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp
cfe/trunk/test/OpenMP/target_private_messages.cpp
cfe/trunk/test/OpenMP/target_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/target_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_simd_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_simd_depend_messages.cpp
cfe/trunk/test/OpenMP/target_simd_device_messages.cpp
cfe/trunk/test/OpenMP/target_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_simd_if_messages.cpp
cfe/trunk/test/OpenMP/target_simd_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_simd_map_messages.cpp
cfe/trunk/test/OpenMP/target_simd_messages.cpp
cfe/trunk/test/OpenMP/target_simd_misc_messages.c
cfe/trunk/test/OpenMP/target_simd_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_simd_private_messages.cpp
cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/target_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/target_teams_default_messages.cpp
cfe/trunk/test/OpenMP/target_teams_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_teams_depend_messages.cpp
cfe/trunk/test/OpenMP/target_teams_device_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_default_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_depend_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_device_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_if_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_map_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_misc_messages.c
cfe/trunk/test/OpenMP/target_teams_distribute_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_num_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_private_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_shared_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_device_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_if_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_misc_messages.c
cfe/trunk/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_private_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/target_teams_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/target_teams_if_messages.cpp
cfe/trunk/test/OpenMP/target_teams_is_device_ptr_messages.cpp
cfe/trunk/test/OpenMP/target_teams_map_messages.cpp
cfe/trunk/test/OpenMP/target_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_teams_num_teams_messages.cpp
cfe/trunk/test/OpenMP/target_teams_private_messages.cpp
cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp
cfe/trunk/test/OpenMP/target_teams_shared_messages.cpp
cfe/trunk/test/OpenMP/target_teams_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/target_update_depend_messages.cpp
cfe/trunk/test/OpenMP/target_update_device_messages.cpp
cfe/trunk/test/OpenMP/target_update_from_messages.cpp
cfe/trunk/test/OpenMP/target_update_if_messages.cpp
cfe/trunk/test/OpenMP/target_update_messages.cpp
cfe/trunk/test/OpenMP/target_update_nowait_messages.cpp
cfe/trunk/test/OpenMP/target_update_to_messages.cpp
cfe/trunk/test/OpenMP/task_default_messages.cpp
cfe/trunk/test/OpenMP/task_depend_messages.cpp
cfe/trunk/test/OpenMP/task_final_messages.cpp
cfe/trunk/test/OpenMP/task_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/task_if_messages.cpp
cfe/trunk/test/OpenMP/task_messages.cpp
cfe/trunk/test/OpenMP/task_priority_messages.cpp
cfe/trunk/test/OpenMP/task_private_messages.cpp
cfe/trunk/test/OpenMP/task_shared_messages.cpp
cfe/trunk/test/OpenMP/taskgroup_messages.cpp
cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp
cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp
cfe/trunk/test/OpenMP/taskloop_final_messages.cpp
cfe/trunk/test/OpenMP/taskloop_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/taskloop_grainsize_messages.cpp
cfe/trunk/test/OpenMP/taskloop_in_reduction_messages.cpp
cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp
cfe/trunk/test/OpenMP/taskloop_misc_messages.c
cfe/trunk/test/OpenMP/taskloop_num_tasks_messages.cpp
cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp
cfe/trunk/test/OpenMP/taskloop_private_messages.cpp
cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_final_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_grainsize_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_in_reduction_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_misc_messages.c
cfe/trunk/test/OpenMP/taskloop_simd_num_tasks_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_priority_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_private_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/taskwait_messages.cpp
cfe/trunk/test/OpenMP/taskyield_messages.cpp
cfe/trunk/test/OpenMP/teams_default_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_default_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_private_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_shared_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_default_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_linear_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_private_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_shared_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_thread_limit_messages.cpp
cfe/trunk/test/OpenMP/teams_firstprivate_messages.cpp
cfe/trunk/test/OpenMP/teams_messages.cpp
cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_private_messages.cpp
cfe/trunk/test/OpenMP/teams_reduction_messages.cpp
cfe/trunk/test/OpenMP/teams_shared_messages.cpp
cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp
Modified: cfe/trunk/test/OpenMP/allocate_allocator_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/allocate_allocator_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/allocate_allocator_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/allocate_allocator_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
struct St{
int a;
Modified: cfe/trunk/test/OpenMP/atomic_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/atomic_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/atomic_messages.c (original)
+++ cfe/trunk/test/OpenMP/atomic_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
int foo() {
L1:
Modified: cfe/trunk/test/OpenMP/atomic_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/atomic_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/atomic_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/atomic_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
int foo() {
L1:
Modified: cfe/trunk/test/OpenMP/cancel_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/cancel_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/cancel_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/cancel_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel
{
#pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
@@ -20,7 +21,7 @@ int tmain(T argc, S **argv) {
#pragma omp cancel parallel if () // expected-error {{expected expression}}
#pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
- #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] + z)
#pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
#pragma omp cancel parallel if (S) // expected-error {{'S' does not refer to a value}}
#pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -40,6 +41,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp parallel
{
#pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
@@ -47,7 +49,7 @@ int main(int argc, char **argv) {
#pragma omp cancel parallel if () // expected-error {{expected expression}}
#pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
- #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] - z)
#pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
#pragma omp cancel parallel if (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/cancel_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/cancel_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/cancel_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/cancel_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
int main(int argc, char **argv) {
#pragma omp cancellation // expected-error {{expected an OpenMP directive}}
Modified: cfe/trunk/test/OpenMP/critical_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/critical_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/critical_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/critical_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
int foo();
Modified: cfe/trunk/test/OpenMP/declare_reduction_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/declare_reduction_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/declare_reduction_messages.c (original)
+++ cfe/trunk/test/OpenMP/declare_reduction_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
int temp; // expected-note 6 {{'temp' declared here}}
Modified: cfe/trunk/test/OpenMP/declare_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/declare_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/declare_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/declare_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s -Wuninitialized
int temp; // expected-note 7 {{'temp' declared here}}
Modified: cfe/trunk/test/OpenMP/distribute_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -31,7 +31,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
- #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
+ #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
@@ -41,6 +41,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -55,7 +56,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
- #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
+ #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 -z ) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
Modified: cfe/trunk/test/OpenMP/distribute_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
extern S1 a;
class S2 {
mutable int a;
-
+
public:
S2() : a(0) {}
S2(const S2 &s2) : a(s2.a) {}
@@ -26,7 +26,7 @@ const S2 ba[5];
class S3 {
int a;
S3 &operator=(const S3 &s3);
-
+
public:
S3() : a(0) {} // expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
S3(S3 &s3) : a(s3.a) {} // expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (i = 0; i < argc; ++i) foo();
@@ -111,7 +111,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
- #pragma omp distribute firstprivate(da)
+ #pragma omp distribute firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -13,10 +13,9 @@ struct S1; // expected-note {{declared h
template <class T, int N>
T tmain(T argc) {
- T b = argc, c, d, e, f, g;
+ T b = argc, c, d, e, f, g, z;
char ** argv;
static T a;
-// CHECK: static T a;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +46,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -61,6 +60,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -126,7 +126,7 @@ int foomain(int argc, char **argv) {
++k;
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp distribute parallel for firstprivate(k, h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, k;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -294,7 +294,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp distribute parallel for firstprivate(k, h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
@@ -56,7 +56,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for if(argc)
+#pragma omp distribute parallel for if(argc+z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
@@ -158,7 +158,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for if(parallel : argc)
+#pragma omp distribute parallel for if(parallel : argc-z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for num_threads (argc)
+#pragma omp distribute parallel for num_threads (argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
+#pragma omp distribute parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -176,7 +176,7 @@ T tmain(T argc) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp distribute parallel for reduction(+ : ba, z) // expected-error {{const-qualified variable cannot be reduction}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target
@@ -272,7 +272,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -434,7 +434,7 @@ int main(int argc, char **argv) {
#pragma omp parallel private(fl)
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for reduction(+ : fl)
+#pragma omp distribute parallel for reduction(+ : fl, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel reduction(* : fl)
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
@@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
+#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
// expected-error at +3 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
@@ -124,7 +126,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
// expected-error at +3 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
struct S1; // expected-note 2 {{declared here}}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -126,7 +126,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T k;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -61,6 +61,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int k;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -101,7 +101,7 @@ int foomain(int argc, char **argv) {
++k;
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd firstprivate(argc)
+#pragma omp distribute parallel for simd firstprivate(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -248,7 +248,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd firstprivate(ba) // OK
+#pragma omp distribute parallel for simd firstprivate(ba, z) // OK
for (i = 0; i < argc; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, k;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
@@ -32,7 +32,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, k;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
@@ -114,7 +114,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
++k;
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd lastprivate(argc)
+#pragma omp distribute parallel for simd lastprivate(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd lastprivate(ba)
+#pragma omp distribute parallel for simd lastprivate(ba, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}}
#pragma omp distribute parallel for simd
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd num_threads (z/argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -151,7 +151,7 @@ T tmain(T argc) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd reduction(&& : argc)
+#pragma omp distribute parallel for simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target
@@ -272,7 +272,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -400,7 +400,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp distribute parallel for simd reduction(+ : z, o) // expected-error {{no viable overloaded '='}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
@@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +3 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
@@ -124,7 +126,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 -z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +3 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
struct S1; // expected-note 2 {{declared here}}
@@ -54,7 +54,7 @@ T tmain(T argc, S **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
int acc = 0;
int n = 1000;
@@ -103,7 +103,7 @@ T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd shared (argc)
+#pragma omp distribute parallel for simd shared (argc, z)
for(int k = 0 ; k < n ; k++) {
acc++;
}
@@ -228,7 +228,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
int acc = 0;
int n = argc;
@@ -277,7 +277,7 @@ int main(int argc, char **argv) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd shared (argc)
+#pragma omp distribute parallel for simd shared (argc, z)
for(int k = 0 ; k < n ; k++) {
acc++;
}
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -34,7 +34,7 @@ class S4 {
public:
S4(int v):a(v) { }
};
-class S5 {
+class S5 {
int a;
S5():a(0) {} // expected-note {{implicitly declared private here}}
public:
Modified: cfe/trunk/test/OpenMP/distribute_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/distribute_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target
#pragma omp teams
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
@@ -69,6 +69,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams
#pragma omp distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -106,7 +107,7 @@ int main(int argc, char **argv) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -111,7 +111,7 @@ int foomain(int argc, char **argv) {
++k;
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
+#pragma omp distribute simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd firstprivate(argc)
+#pragma omp distribute simd firstprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams
@@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
++k;
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd lastprivate(argc)
+#pragma omp distribute simd lastprivate(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
Modified: cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
static int sii;
// expected-note at +1 {{defined as threadprivate or thread local}}
Modified: cfe/trunk/test/OpenMP/distribute_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp distribute simd'}}
#pragma omp distribute simd
Modified: cfe/trunk/test/OpenMP/distribute_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -89,6 +89,7 @@ T tmain(T argc) {
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
T i;
+ long z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -156,7 +157,7 @@ T tmain(T argc) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+#pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target
@@ -272,7 +273,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -335,7 +336,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd reduction(&& : argc)
+#pragma omp distribute simd reduction(&& : z, argc)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/distribute_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/distribute_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/flush_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/flush_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/flush_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/flush_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
struct S1 { // expected-note 2 {{declared here}}
int a;
Modified: cfe/trunk/test/OpenMP/for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
// expected-error at +2 2 {{expression is not an integral constant expression}}
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
- #pragma omp for collapse (argc
+ #pragma omp for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel
#pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -207,7 +207,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
+#pragma omp for firstprivate(a, b, c, d, f, k) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel
#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -112,7 +112,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp for lastprivate(k, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -163,7 +163,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel
#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -190,7 +190,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp for lastprivate(argc)
+#pragma omp for lastprivate(argc, k)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/for_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -104,7 +104,7 @@ S3 h;
template<class I, class C> int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -128,7 +128,7 @@ template<class I, class C> int foomain(I
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp for linear(e, g)
+ #pragma omp for linear(e, g, k)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k) ++k;
@@ -170,7 +170,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, k;
int &j = i;
#pragma omp for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -190,7 +190,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
// expected-error at +2 {{linear variable with incomplete type 'S1'}}
// expected-error at +1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
- #pragma omp for linear(a, b)
+ #pragma omp for linear(a, b, k)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
Modified: cfe/trunk/test/OpenMP/for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/for_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp for'}}
#pragma omp for
Modified: cfe/trunk/test/OpenMP/for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -147,11 +147,11 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
-#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
-#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp for reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
@@ -245,7 +245,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -312,7 +312,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
-#pragma omp for reduction(max : argv[1])
+#pragma omp for reduction(max : argv[1], z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -45,7 +46,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2)
+ #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -82,6 +83,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -98,7 +100,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ #pragma omp for schedule (static, 2+2-z)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
Modified: cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -160,7 +160,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp for simd lastprivate(argc)
+#pragma omp for simd lastprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -137,8 +137,9 @@ template<class I, class C> int foomain(I
#pragma omp parallel
{
int v = 0;
+ long z;
int i;
- #pragma omp for simd linear(v:i)
+ #pragma omp for simd linear(z, v:i)
for (int k = 0; k < argc; ++k) { i = k; v += i; }
}
#pragma omp for simd linear(j)
@@ -188,7 +189,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
// expected-error at +2 {{linear variable with incomplete type 'S1'}}
// expected-error at +1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
- #pragma omp for simd linear (a, b)
+ #pragma omp for simd linear(a, b)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
@@ -201,7 +202,7 @@ int main(int argc, char **argv) {
#pragma omp parallel
{
int i;
- #pragma omp for simd linear(i)
+ #pragma omp for simd linear(i : i)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for simd linear(i : 4)
for (int k = 0; k < argc; ++k) { ++k; i += 4; }
Modified: cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/for_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp for simd'}}
#pragma omp for simd
Modified: cfe/trunk/test/OpenMP/for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -87,7 +87,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -146,7 +146,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
-#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
@@ -236,7 +236,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
-#pragma omp for simd reduction(&& : argc)
+#pragma omp for simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+ #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/master_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/master_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/master_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/master_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
int foo();
Modified: cfe/trunk/test/OpenMP/ordered_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/ordered_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/ordered_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/ordered_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
int foo();
Modified: cfe/trunk/test/OpenMP/parallel_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
static int m;
#pragma omp parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
#pragma omp parallel firstprivate (argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
#pragma omp parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
- #pragma omp parallel firstprivate (d)
+ #pragma omp parallel firstprivate (z, d)
d = 5; // expected-error {{cannot assign to variable 'd' with const-qualified type}}
#pragma omp parallel firstprivate (argv[1]) // expected-error {{expected variable name}}
#pragma omp parallel firstprivate(ba)
Modified: cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (int k = 0; k < argc; ++k)
@@ -93,7 +93,7 @@ int foomain(int argc, char **argv) {
#pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
Modified: cfe/trunk/test/OpenMP/parallel_for_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for if(argc)
+ #pragma omp parallel for if(argc/z)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -55,7 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i,z;
#pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for if(parallel : argc)
+ #pragma omp parallel for if(parallel : z*argc)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (int k = 0; k < argc; ++k)
@@ -95,7 +95,7 @@ int foomain(int argc, char **argv) {
#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp parallel for lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}}
@@ -143,7 +143,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (i = 0; i < argc; ++i)
@@ -163,7 +163,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp parallel for lastprivate(argc)
+#pragma omp parallel for lastprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -120,7 +120,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -140,7 +140,7 @@ int foomain(I argc, C **argv) {
#pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for linear(argc : 5)
+#pragma omp parallel for linear(argc, z : 5)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
@@ -205,7 +205,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -225,7 +225,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for linear(argc)
+#pragma omp parallel for linear(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/parallel_for_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_for_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
#pragma omp parallel for
Modified: cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for num_threads (argc)
+ #pragma omp parallel for num_threads (argc+z)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ #pragma omp parallel for num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/parallel_for_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -92,7 +92,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -137,7 +137,7 @@ T tmain(T argc) {
#pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
Modified: cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
+ #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -56,6 +57,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -74,7 +76,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
#pragma omp parallel for simd firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for simd firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp parallel for simd firstprivate(h, z) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for simd linear(i)
@@ -154,7 +154,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (i = 0; i < argc; ++i)
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp parallel for simd firstprivate(argc)
+#pragma omp parallel for simd firstprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd if(argc)
+ #pragma omp parallel for simd if(argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -55,7 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd if(parallel : argc)
+ #pragma omp parallel for simd if(parallel : argc / z)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for simd'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -68,7 +68,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (int k = 0; k < argc; ++k)
@@ -100,7 +100,7 @@ int foomain(int argc, char **argv) {
#pragma omp parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp parallel for simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -145,7 +145,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (i = 0; i < argc; ++i)
@@ -180,7 +180,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp parallel for simd lastprivate(ba)
+#pragma omp parallel for simd lastprivate(ba, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -104,7 +104,7 @@ S3 h;
template<class I, class C> int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -132,7 +132,7 @@ template<class I, class C> int foomain(I
for (int k = 0; k < argc; ++k) ++k;
#pragma omp parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp parallel for simd linear(i)
+ #pragma omp parallel for simd linear(i, z)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp parallel
{
@@ -168,7 +168,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -182,13 +182,13 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
#pragma omp parallel for simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp parallel for simd linear (argc)
+ #pragma omp parallel for simd linear (argc, z)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k) ++k;
// expected-error at +2 {{linear variable with incomplete type 'S1'}}
// expected-error at +1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
- #pragma omp parallel for simd linear (a, b)
+ #pragma omp parallel for simd linear (a, b)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd num_threads (argc)
+ #pragma omp parallel for simd num_threads (argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
+ #pragma omp parallel for simd num_threads (argc * z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -97,7 +97,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -123,7 +123,7 @@ int foomain(I argc, C **argv) {
#pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for simd private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+#pragma omp parallel for simd private(z, a, b) // expected-error {{private variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for simd private(argv[1]) // expected-error {{expected variable name}}
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0);
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -192,7 +192,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp parallel for simd private(argc)
+#pragma omp parallel for simd private(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -131,7 +131,7 @@ T tmain(T argc) {
#pragma omp parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -247,7 +247,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp parallel for simd reduction(&& : argc)
+#pragma omp parallel for simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T k;
#pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -46,7 +47,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
#pragma omp parallel for simd schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for simd schedule (dynamic, 1)
+ #pragma omp parallel for simd schedule (dynamic, k)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int k;
#pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -68,7 +70,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp parallel for simd schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel for simd schedule (guided, k // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,12 +13,13 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel if // expected-error {{expected '(' after 'if'}}
#pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel if () // expected-error {{expected expression}}
#pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
- #pragma omp parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp parallel if (argc > 0 ? argv[1] : argv[2] + z)
#pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}}
#pragma omp parallel if (S) // expected-error {{'S' does not refer to a value}}
#pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -37,6 +38,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp parallel if // expected-error {{expected '(' after 'if'}}
#pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel if () // expected-error {{expected expression}}
@@ -52,7 +54,7 @@ int main(int argc, char **argv) {
#pragma omp parallel if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel if(parallel : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp parallel if(parallel : argc)
+ #pragma omp parallel if(parallel : argc>> z)
#pragma omp parallel if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel'}}
#pragma omp parallel if(parallel : argc) if (parallel:argc) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}}
#pragma omp parallel if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
Modified: cfe/trunk/test/OpenMP/parallel_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -15,6 +15,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
#pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel num_threads () // expected-error {{expected expression}}
@@ -24,7 +25,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}}
#pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
- #pragma omp parallel num_threads (argc)
+ #pragma omp parallel num_threads (argc+z)
#pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel redef_num_threads (argc, argc)
foo();
@@ -33,11 +34,12 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
#pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel num_threads () // expected-error {{expected expression}}
#pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel num_threads (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
#pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
#pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -57,7 +57,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 }; // expected-note {{'da' defined here}}
S4 e(4);
S5 g[] = {5, 6};
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel private // expected-error {{expected '(' after 'private'}}
#pragma omp parallel private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}
foo();
- #pragma omp parallel private(i)
+ #pragma omp parallel private(i, z)
#pragma omp parallel private(j)
foo();
#pragma omp parallel firstprivate(i)
Modified: cfe/trunk/test/OpenMP/parallel_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -85,7 +85,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -117,7 +117,7 @@ T tmain(T argc) {
foo();
#pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}}
foo();
-#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
foo();
#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
foo();
@@ -180,7 +180,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp parallel reduction(~ : argc) // expected-error {{expected unqualified-id}}
foo();
-#pragma omp parallel reduction(&& : argc)
+#pragma omp parallel reduction(&& : argc, z)
foo();
#pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
foo();
Modified: cfe/trunk/test/OpenMP/parallel_sections_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_sections_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{
@@ -101,7 +101,7 @@ int foomain(int argc, char **argv) {
{
foo();
}
-#pragma omp parallel sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp parallel sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
{
foo();
}
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
{
foo();
}
-#pragma omp parallel sections firstprivate(argc)
+#pragma omp parallel sections firstprivate(argc, z)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
{
foo();
@@ -53,7 +54,7 @@ int tmain(T argc, S **argv) {
{
foo();
}
- #pragma omp parallel sections if(argc)
+ #pragma omp parallel sections if(argc + z)
{
foo();
}
@@ -86,6 +87,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
{
foo();
@@ -106,7 +108,7 @@ int main(int argc, char **argv) {
{
foo();
}
- #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2] + z)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/parallel_sections_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
{foo();}
#pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -31,7 +32,7 @@ T tmain(T argc, S **argv) {
{foo();}
#pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
{foo();}
- #pragma omp parallel sections num_threads (argc)
+ #pragma omp parallel sections num_threads (argc + z)
{foo();}
#pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
{foo();}
@@ -40,6 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
{foo();}
#pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -48,7 +50,7 @@ int main(int argc, char **argv) {
{foo();}
#pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
{foo();}
- #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ #pragma omp parallel sections num_threads (argc / z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
{foo();}
#pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
{foo();}
Modified: cfe/trunk/test/OpenMP/parallel_sections_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -109,7 +109,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
{
@@ -151,7 +151,7 @@ int foomain(I argc, C **argv) {
{
foo();
}
-#pragma omp parallel sections private(e, g)
+#pragma omp parallel sections private(e, g, z)
{
foo();
}
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0);
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
{
@@ -225,7 +225,7 @@ int main(int argc, char **argv) {
{
foo();
}
-#pragma omp parallel sections private(argc)
+#pragma omp parallel sections private(argc, z)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -87,7 +87,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -145,7 +145,7 @@ T tmain(T argc) {
{
foo();
}
-#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel sections reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
{
foo();
}
@@ -240,7 +240,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -342,7 +342,7 @@ int main(int argc, char **argv) {
{
foo();
}
-#pragma omp parallel sections reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp parallel sections reduction(+ : o, z) // expected-error {{no viable overloaded '='}}
{
foo();
}
Modified: cfe/trunk/test/OpenMP/parallel_sections_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
const int da[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel sections shared // expected-error {{expected '(' after 'shared'}}
{ foo(); }
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
{ foo(); }
#pragma omp parallel sections shared(S1) // expected-error {{'S1' does not refer to a value}}
{ foo(); }
-#pragma omp parallel sections shared(a, b, c, d, f)
+#pragma omp parallel sections shared(a, b, c, d, f, k)
{ foo(); }
#pragma omp parallel sections shared(argv[1]) // expected-error {{expected variable name}}
{ foo(); }
Modified: cfe/trunk/test/OpenMP/parallel_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel shared // expected-error {{expected '(' after 'shared'}}
#pragma omp parallel shared ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -69,7 +69,7 @@ int main(int argc, char **argv) {
#pragma omp parallel shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
#pragma omp parallel shared (argc)
#pragma omp parallel shared (S1) // expected-error {{'S1' does not refer to a value}}
- #pragma omp parallel shared (a, b, c, d, f)
+ #pragma omp parallel shared (a, b, c, d, f, k)
#pragma omp parallel shared (argv[1]) // expected-error {{expected variable name}}
#pragma omp parallel shared(ba)
#pragma omp parallel shared(ca)
Modified: cfe/trunk/test/OpenMP/requires_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/requires_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/requires_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/requires_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
int a;
#pragma omp requires unified_address allocate(a) // expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note{{unified_address clause previously used here}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp requires'}}
Modified: cfe/trunk/test/OpenMP/sections_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
foo();
}
#pragma omp parallel
-#pragma omp sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
{
foo();
}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -221,7 +221,7 @@ int main(int argc, char **argv) {
foo();
}
#pragma omp parallel
-#pragma omp sections firstprivate(argc)
+#pragma omp sections firstprivate(argc, z)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -68,7 +68,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel
#pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -111,7 +111,7 @@ int foomain(int argc, char **argv) {
foo();
}
#pragma omp parallel
-#pragma omp sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp sections lastprivate(a, b, k) // expected-error {{lastprivate variable with incomplete type 'S1'}}
{
foo();
}
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, k;
int &j = i;
#pragma omp parallel
#pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
foo();
}
#pragma omp parallel
-#pragma omp sections lastprivate(ba)
+#pragma omp sections lastprivate(ba, k)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/sections_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/sections_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/sections_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/sections_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -210,7 +210,7 @@ T tmain(T argc) {
foo();
}
#pragma omp parallel
-#pragma omp sections reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp sections reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}}
{
foo();
}
@@ -268,7 +268,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -330,7 +330,7 @@ int main(int argc, char **argv) {
foo();
}
#pragma omp parallel
-#pragma omp sections reduction(&& : argc)
+#pragma omp sections reduction(&& : argc, z)
{
foo();
}
Modified: cfe/trunk/test/OpenMP/simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -104,7 +104,7 @@ S3 h;
template<class I, class C> int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -140,7 +140,7 @@ template<class I, class C> int foomain(I
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+ #pragma omp simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -195,7 +195,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
for (int k = 0; k < argc; ++k) ++k;
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
// expected-error at +2 {{linear variable with incomplete type 'S1'}}
// expected-error at +1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
- #pragma omp simd linear(a, b)
+ #pragma omp simd linear(a, b, z)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
Modified: cfe/trunk/test/OpenMP/simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized
static int sii;
// expected-note at +1 {{defined as threadprivate or thread local}}
Modified: cfe/trunk/test/OpenMP/simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp simd'}}
#pragma omp simd
Modified: cfe/trunk/test/OpenMP/simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -131,7 +131,7 @@ T tmain(T argc) {
#pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -211,7 +211,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -250,7 +250,7 @@ int main(int argc, char **argv) {
#pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp simd reduction(&& : argc)
+#pragma omp simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/single_copyprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_copyprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/single_copyprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/single_copyprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -45,8 +45,10 @@ S5 m(4);
template <class T, class C>
T tmain(T argc, C **argv) {
- T i;
+ T i, z;
static T TA;
+#pragma omp single copyprivate(z)
+ ;
#pragma omp parallel
#pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
#pragma omp parallel
@@ -121,7 +123,7 @@ using A::x;
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
static int intA;
#pragma omp parallel
#pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
@@ -146,9 +148,9 @@ int main(int argc, char **argv) {
#pragma omp parallel
#pragma omp single copyprivate(m) // expected-error {{'operator=' is a private member of 'S5'}}
foo();
-#pragma omp parallel private(i)
+#pragma omp parallel private(i, z)
{
-#pragma omp single copyprivate(i)
+#pragma omp single copyprivate(i, z)
foo();
}
#pragma omp parallel shared(i) // expected-note {{defined as shared}}
Modified: cfe/trunk/test/OpenMP/single_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/single_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/single_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -94,7 +94,7 @@ int foomain(int argc, char **argv) {
#pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
foo();
#pragma omp parallel
-#pragma omp single firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp single firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
foo();
#pragma omp parallel
#pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -150,7 +150,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -171,7 +171,7 @@ int main(int argc, char **argv) {
#pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
foo();
#pragma omp parallel
-#pragma omp single firstprivate(argc)
+#pragma omp single firstprivate(argc, z)
foo();
#pragma omp parallel
#pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/single_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/single_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/single_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/single_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/single_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/single_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/target_data_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_data_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_data_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,14 +12,14 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int a;
+ int a, z;
#pragma omp target data map(to: a) device // expected-error {{expected '(' after 'device'}}
#pragma omp target data map(to: a) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target data map(to: a) device () // expected-error {{expected expression}}
#pragma omp target data map(to: a) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target data map(to: a) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
#pragma omp target data map(to: a) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
- #pragma omp target data map(to: a) device (argc + argc)
+ #pragma omp target data map(to: a) device (argc + argc + z)
#pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}}
#pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
Modified: cfe/trunk/test/OpenMP/target_data_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_data_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_data_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,14 +12,14 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int a;
+ int a, z;
#pragma omp target data map(to: a) if // expected-error {{expected '(' after 'if'}}
#pragma omp target data map(to: a) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target data map(to: a) if () // expected-error {{expected expression}}
#pragma omp target data map(to: a) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target data map(to: a) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
#pragma omp target data map(to: a) if (argc > 0 ? argv[1] : argv[2])
- #pragma omp target data map(to: a) if (argc + argc)
+ #pragma omp target data map(to: a) if (argc + argc + z)
#pragma omp target data map(to: a) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'if' clause}}
#pragma omp target data map(to: a) if (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target data map(to: a) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/target_data_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_data_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_data_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() { }
Modified: cfe/trunk/test/OpenMP/target_data_use_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_use_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_data_use_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_data_use_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,6 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
+ int z;
#pragma omp target device // expected-error {{expected '(' after 'device'}}
foo();
#pragma omp target device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -20,7 +21,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
- #pragma omp target device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}
+ #pragma omp target device (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}
foo();
#pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_enter_data_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_enter_data_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_enter_data_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_enter_data_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_enter_data_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_enter_data_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_enter_data_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_enter_data_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,14 +12,14 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target enter data map(to: i) device // expected-error {{expected '(' after 'device'}}
#pragma omp target enter data map(to: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target enter data map(to: i) device () // expected-error {{expected expression}}
#pragma omp target enter data map(to: i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target enter data map(to: i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target enter data' are ignored}}
#pragma omp target enter data map(to: i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
- #pragma omp target enter data map(to: i) device (argc + argc)
+ #pragma omp target enter data map(to: i) device (argc +z + argc )
#pragma omp target enter data map(to: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'device' clause}}
#pragma omp target enter data map(to: i) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target enter data map(to: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
Modified: cfe/trunk/test/OpenMP/target_enter_data_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_enter_data_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_enter_data_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_enter_data_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target enter data map(to: i) if // expected-error {{expected '(' after 'if'}}
#pragma omp target enter data map(to: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target enter data map(to: i) if () // expected-error {{expected expression}}
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
#pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target enter data map(to: i) if(target enter data : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp target enter data map(to: i) if(target enter data : argc)
+ #pragma omp target enter data map(to: i) if(target enter data : argc + z)
#pragma omp target enter data map(to: i) if(target enter data : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target enter data'}}
#pragma omp target enter data map(to: i) if(target enter data : argc) if (target enter data:argc) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'if' clause with 'target enter data' name modifier}}
#pragma omp target enter data map(to: i) if(target enter data : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
Modified: cfe/trunk/test/OpenMP/target_enter_data_map_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_enter_data_map_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_enter_data_map_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_enter_data_map_messages.c Mon Jul 8 08:45:24 2019
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized
int main(int argc, char **argv) {
Modified: cfe/trunk/test/OpenMP/target_enter_data_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_enter_data_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_enter_data_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_enter_data_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
int main(int argc, char **argv) {
int i;
Modified: cfe/trunk/test/OpenMP/target_exit_data_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_exit_data_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_exit_data_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_exit_data_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_exit_data_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_exit_data_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_exit_data_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_exit_data_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target exit data map(from: i) device // expected-error {{expected '(' after 'device'}}
#pragma omp target exit data map(from: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target exit data map(from: i) device () // expected-error {{expected expression}}
@@ -23,7 +23,7 @@ int main(int argc, char **argv) {
#pragma omp target exit data map(from: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'device' clause}}
#pragma omp target exit data map(from: i) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target exit data map(from: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
- #pragma omp target exit data map(from: i) device (-10u)
+ #pragma omp target exit data map(from: i) device (-10u + z)
#pragma omp target exit data map(from: i) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_exit_data_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_exit_data_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_exit_data_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_exit_data_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,14 +12,14 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target exit data map(from: i) if // expected-error {{expected '(' after 'if'}}
#pragma omp target exit data map(from: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target exit data map(from: i) if () // expected-error {{expected expression}}
#pragma omp target exit data map(from: i) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target exit data map(from: i) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}}
#pragma omp target exit data map(from: i) if (argc > 0 ? argv[1] : argv[2])
- #pragma omp target exit data map(from: i) if (argc + argc)
+ #pragma omp target exit data map(from: i) if (argc + argc + z)
#pragma omp target exit data map(from: i) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'if' clause}}
#pragma omp target exit data map(from: i) if (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target exit data map(from: i) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/target_exit_data_map_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_exit_data_map_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_exit_data_map_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_exit_data_map_messages.c Mon Jul 8 08:45:24 2019
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized
int main(int argc, char **argv) {
Modified: cfe/trunk/test/OpenMP/target_exit_data_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_exit_data_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_exit_data_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_exit_data_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
int main(int argc, char **argv) {
int i;
Modified: cfe/trunk/test/OpenMP/target_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -99,7 +99,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{}
@@ -131,8 +131,8 @@ int foomain(I argc, C **argv) {
int v = 0;
int i;
}
-#pragma omp parallel shared(i)
-#pragma omp parallel firstprivate(i)
+#pragma omp parallel shared(i, z)
+#pragma omp parallel firstprivate(i, z)
#pragma omp target firstprivate(j)
{}
#pragma omp target firstprivate(i)
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0);
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{}
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
{}
#pragma omp target firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
{}
-#pragma omp target firstprivate(argc)
+#pragma omp target firstprivate(argc, z)
{}
#pragma omp target firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
{}
Modified: cfe/trunk/test/OpenMP/target_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp target if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -33,7 +34,7 @@ int tmain(T argc, S **argv) {
foo();
#pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
- #pragma omp target if(argc)
+ #pragma omp target if(argc+z)
foo();
#pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
@@ -52,6 +53,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp target if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -80,7 +82,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
- #pragma omp target if(target : argc)
+ #pragma omp target if(target : argc/z)
foo();
#pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
struct ST {
int *a;
};
@@ -40,7 +40,7 @@ struct SA {
#pragma omp target is_device_ptr(aa) // OK
{}
#pragma omp target is_device_ptr(raa) // OK
- {}
+ {}
#pragma omp target is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target is_device_ptr(g) // OK
Modified: cfe/trunk/test/OpenMP/target_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
#ifdef CCODE
void foo(int arg) {
const int n = 0;
Modified: cfe/trunk/test/OpenMP/target_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,6 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
+ int k;
#pragma omp target parallel device // expected-error {{expected '(' after 'device'}}
foo();
#pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -26,7 +27,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel device (argc + argc)
foo();
- #pragma omp target parallel device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}
+ #pragma omp target parallel device (k), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}
foo();
#pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}}
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -72,7 +72,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
static int m;
#pragma omp target parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel firstprivate(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel' directive}}
foo();
- #pragma omp target parallel firstprivate(ca)
+ #pragma omp target parallel firstprivate(ca, z)
foo();
#pragma omp target parallel firstprivate(da)
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target parallel for device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for device (argc + argc)
+ #pragma omp target parallel for device (z + argc)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
#pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp target parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
int i;
+ T z;
#pragma omp target parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +35,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for if(argc)
+ #pragma omp target parallel for if(argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -61,7 +62,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +73,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2] - z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'if' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
Modified: cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_parallel_for_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -166,7 +166,7 @@ int foomain(I argc, C **argv) {
#pragma omp target parallel for allocate(omp_thread_mem_alloc: e) linear(e, g) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+#pragma omp target parallel for linear(z, h) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for linear(i)
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for linear(argc)
+#pragma omp target parallel for linear(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_parallel_for_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target parallel for'}}
#pragma omp target parallel for
Modified: cfe/trunk/test/OpenMP/target_parallel_for_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
+ #pragma omp target parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
+ #pragma omp target parallel for num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_ordered_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_ordered_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_ordered_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_ordered_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -132,7 +132,7 @@ int foomain(I argc, C **argv) {
#pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+#pragma omp target parallel for private(a, b, z) // expected-error {{private variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for private(argv[1]) // expected-error {{expected variable name}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0);
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i ,z;
int &j = i;
#pragma omp target parallel for private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for private(argc)
+#pragma omp target parallel for private(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
#pragma omp target parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target parallel for reduction(&& : argc)
+#pragma omp target parallel for reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -46,7 +47,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
#pragma omp target parallel for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp target parallel for schedule (dynamic, 1)
+ #pragma omp target parallel for schedule (dynamic, 1 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 + z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target parallel for simd device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for simd device (argc + argc)
+ #pragma omp target parallel for simd device (argc + argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i,z;
int &j = i;
#pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
#pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp target parallel for simd firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- int i;
+ int i, k;
#pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for simd if(argc)
+ #pragma omp target parallel for simd if(k)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -61,7 +61,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, k;
#pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -90,7 +90,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for simd if(parallel : argc)
+ #pragma omp target parallel for simd if(parallel : k)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel for simd'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (int k = 0; k < argc; ++k)
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
#pragma omp target parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp target parallel for simd lastprivate(ba)
+#pragma omp target parallel for simd lastprivate(ba, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp target parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -163,7 +163,7 @@ int foomain(I argc, C **argv) {
#pragma omp target parallel for simd linear(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd linear(e, g)
+#pragma omp target parallel for simd linear(e, g, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd linear(argc)
+#pragma omp target parallel for simd linear(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd linear(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -61,7 +61,7 @@ T tmain(T argc) {
T &j = i;
T *k = &j;
T x;
- T y;
+ T y ,z;
T to, tofrom, always;
const T (&l)[5] = da;
@@ -102,7 +102,7 @@ T tmain(T argc) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(S2::S2sc)
for (i = 0; i < argc; ++i) foo();
-#pragma omp target parallel for simd map(x)
+#pragma omp target parallel for simd map(x, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(to: x)
for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
int &j = i;
int *k = &j;
int x;
- int y;
+ int y, z;
int to, tofrom, always;
const int (&l)[5] = da;
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(to: to)
for (i = 0; i < argc; ++i) foo();
-#pragma omp target parallel for simd map(to)
+#pragma omp target parallel for simd map(to, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(to, x)
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}}
#pragma omp target parallel for simd
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
+ #pragma omp target parallel for simd num_threads (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
+ #pragma omp target parallel for simd num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
#pragma omp target parallel for simd private(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd private(e, g)
+#pragma omp target parallel for simd private(e, g, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target parallel for simd private(argc)
+#pragma omp target parallel for simd private(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
#pragma omp target parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target parallel for simd reduction(&& : argc)
+#pragma omp target parallel for simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+ #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}}
// expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp target parallel if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -23,7 +24,7 @@ int tmain(T argc, S **argv) {
foo();
#pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
foo();
- #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2] + z)
foo();
#pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}}
foo();
@@ -60,6 +61,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target parallel if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -88,7 +90,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
- #pragma omp target parallel if(parallel : argc)
+ #pragma omp target parallel if(parallel : argc * z)
foo();
#pragma omp target parallel if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -61,7 +61,7 @@ T tmain(T argc) {
T &j = i;
T *k = &j;
T x;
- T y;
+ T y, z;
T to, tofrom, always;
const T (&l)[5] = da;
@@ -88,7 +88,7 @@ T tmain(T argc) {
foo();
#pragma omp target parallel map(l[true:true])
foo();
-#pragma omp target parallel map(x)
+#pragma omp target parallel map(x, z)
foo();
#pragma omp target parallel map(tofrom: t[:I])
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
// RUN: not %clang_cc1 -fopenmp -std=c++11 -fopenmp-targets=aaa-bbb-ccc-ddd -o - %s 2>&1 | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
Modified: cfe/trunk/test/OpenMP/target_parallel_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -15,6 +15,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
#pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
foo();
#pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -33,7 +34,7 @@ T tmain(T argc, S **argv) {
foo();
#pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
- #pragma omp target parallel num_threads (argc)
+ #pragma omp target parallel num_threads (argc + z)
foo();
#pragma omp target parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
foo();
@@ -44,6 +45,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
foo();
#pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -52,7 +54,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
- #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
+ #pragma omp target parallel num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
foo();
#pragma omp target parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
foo();
#pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}}
foo();
-#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
foo();
#pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
foo();
@@ -192,7 +192,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -220,7 +220,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel reduction(~ : argc) // expected-error {{expected unqualified-id}}
foo();
-#pragma omp target parallel reduction(&& : argc)
+#pragma omp target parallel reduction(&& : argc, z)
foo();
#pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
foo();
Modified: cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target parallel shared // expected-error {{expected '(' after 'shared'}}
foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target parallel shared (S1) // expected-error {{'S1' does not refer to a value}}
foo();
- #pragma omp target parallel shared (a, b, c, d, f)
+ #pragma omp target parallel shared (a, b, c, d, f, z)
foo();
#pragma omp target parallel shared (argv[1]) // expected-error {{expected variable name}}
foo();
Modified: cfe/trunk/test/OpenMP/target_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -122,7 +122,7 @@ T tmain(T argc) {
foo();
#pragma omp target reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}}
foo();
-#pragma omp target reduction(&& : argc)
+#pragma omp target reduction(&& : argc, z)
foo();
#pragma omp target reduction(^ : T) // expected-error {{'T' does not refer to a value}}
foo();
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
foo();
-#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+#pragma omp target reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
foo();
#pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
foo();
Modified: cfe/trunk/test/OpenMP/target_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/target_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
template <class T, typename S, int N, int ST>
T tmain(T argc, S **argv) {
- int i;
+ int i, k;
#pragma omp target simd defaultmap // expected-error {{expected '(' after 'defaultmap'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/target_simd_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target simd device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target simd device (argc + argc)
+ #pragma omp target simd device (argc + argc * z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
#pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target simd firstprivate(a, b, z) // expected-error {{firstprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target simd firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for (i = 0; i < argc; ++i)
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
#pragma omp target simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i)
foo();
-#pragma omp target simd firstprivate(argc)
+#pragma omp target simd firstprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
int i;
#pragma omp target simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -34,7 +35,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target simd if(argc)
+ #pragma omp target simd if(argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -53,7 +54,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -82,7 +83,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp target simd if(target : argc) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}}
+ #pragma omp target simd if(target : argc + z) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target simd if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'if' clause with 'target' name modifier}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_simd_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
Modified: cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -169,7 +169,7 @@ int foomain(I argc, C **argv) {
#pragma omp target simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd linear(i)
+#pragma omp target simd linear(i, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
#pragma omp target simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd linear(argc)
+#pragma omp target simd linear(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target simd linear(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_simd_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target simd'}}
#pragma omp target simd
Modified: cfe/trunk/test/OpenMP/target_simd_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
#pragma omp target simd private(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd private(e, g)
+#pragma omp target simd private(e, g, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp target simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
#pragma omp target simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd private(argc)
+#pragma omp target simd private(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target simd private(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
#pragma omp target simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
#pragma omp target simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp target simd reduction(&& : argc)
+#pragma omp target simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp target simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,6 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams device // expected-error {{expected '(' after 'device'}}
foo();
#pragma omp target teams device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -24,7 +25,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target teams device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
-#pragma omp target teams device (argc + argc)
+#pragma omp target teams device (argc + argc + z)
foo();
#pragma omp target teams device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'device' clause}}
foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute device (argc + argc)
+#pragma omp target teams distribute device (argc + argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
#pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -113,7 +113,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute firstprivate(da)
+#pragma omp target teams distribute firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute firstprivate(S2::S2s)
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
int i;
+ T z;
#pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -26,7 +27,7 @@ int tmain(T argc, S **argv) {
#pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
+#pragma omp target teams distribute if (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2])
@@ -84,7 +85,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -97,7 +98,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
+#pragma omp target teams distribute if (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2])
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}}
#pragma omp target teams distribute
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute num_teams(C)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute num_teams(argc + argc)
+#pragma omp target teams distribute num_teams(argc + argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute num_teams (argc + argc)
+#pragma omp target teams distribute num_teams (argc + argc+z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute parallel for device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for device (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for firstprivate(da)
+#pragma omp target teams distribute parallel for firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for firstprivate(S2::S2s)
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for if(argc)
+#pragma omp target teams distribute parallel for if(argc -z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -61,7 +61,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for if(parallel : argc)
+#pragma omp target teams distribute parallel for if(parallel : argc / z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams distribute parallel for'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -61,7 +61,7 @@ T tmain(T argc) {
T &j = i;
T *k = &j;
T x;
- T y;
+ T y, z;
T to, tofrom, always;
const T (&l)[5] = da;
@@ -102,7 +102,7 @@ T tmain(T argc) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(S2::S2sc)
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for map(x)
+#pragma omp target teams distribute parallel for map(x, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(to: x)
for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
int &j = i;
int *k = &j;
int x;
- int y;
+ int y, z;
int to, tofrom, always;
const int (&l)[5] = da;
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(argv[1])
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for map(ba)
+#pragma omp target teams distribute parallel for map(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(ca)
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma omp target teams distribute parallel for
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute parallel for num_teams(C)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for num_teams(argc + argc)
+#pragma omp target teams distribute parallel for num_teams(argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for num_teams (argc + argc)
+#pragma omp target teams distribute parallel for num_teams (argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for num_threads (argc - z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for num_threads (z - argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -127,7 +127,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for reduction(+ : z, ba) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for reduction(- : da, z) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
// expected-error at +1 {{expected '(' after 'schedule'}}
#pragma omp target teams distribute parallel for schedule
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -50,7 +51,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
-#pragma omp target teams distribute parallel for schedule (dynamic, 1))
+#pragma omp target teams distribute parallel for schedule (dynamic, z+1))
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target teams distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
@@ -81,6 +82,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
// expected-error at +1 {{expected '(' after 'schedule'}}
#pragma omp target teams distribute parallel for schedule
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
@@ -114,7 +116,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
-#pragma omp target teams distribute parallel for schedule (static, 2+2))
+#pragma omp target teams distribute parallel for schedule (static, 2+2 + z))
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target teams distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp target teams distribute parallel for shared // expected-error {{expected '(' after 'shared'}}
for (int j=0; j<100; j++) foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for shared (S1) // expected-error {{'S1' does not refer to a value}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for shared (a, b, c, d, f)
+#pragma omp target teams distribute parallel for shared (a, b, c, d, f, k)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for shared (argv[1]) // expected-error {{expected variable name}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute parallel for simd device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd device (argc + argc)
+#pragma omp target teams distribute parallel for simd device (argc + argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -23,7 +23,7 @@ struct S1; // expected-note {{declared h
extern S1 a;
class S2 {
mutable int a;
-
+
public:
S2() : a(0) {}
S2(const S2 &s2) : a(s2.a) {}
@@ -36,7 +36,7 @@ const S2 ba[5];
class S3 {
int a;
S3 &operator=(const S3 &s3);
-
+
public:
S3() : a(0) {} // expected-note 2 {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
S3(S3 &s3) : a(s3.a) {} // expected-note 2 {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd firstprivate(da)
+#pragma omp target teams distribute parallel for simd firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd firstprivate(S2::S2s)
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, k;
#pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
for (i = 0; i < argc; ++i) foo();
@@ -73,7 +73,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, k;
#pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
-#pragma omp target teams distribute parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp target teams distribute parallel for simd lastprivate(e, g, z) // expected-error 2 {{calling a private constructor of class 'S4'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target teams distribute parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
float k;
#pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd lastprivate(ba)
+#pragma omp target teams distribute parallel for simd lastprivate(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -61,7 +61,7 @@ T tmain(T argc) {
T &j = i;
T *k = &j;
T x;
- T y;
+ T y, z;
T to, tofrom, always;
const T (&l)[5] = da;
@@ -88,7 +88,7 @@ T tmain(T argc) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(l[true:true])
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd map(x)
+#pragma omp target teams distribute parallel for simd map(x, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
int &j = i;
int *k = &j;
int x;
- int y;
+ int y, z;
int to, tofrom, always;
const int (&l)[5] = da;
@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(to)
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd map(to, x)
+#pragma omp target teams distribute parallel for simd map(to, x, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(to x) // expected-error {{expected ',' or ')' in 'map' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}}
#pragma omp target teams distribute parallel for simd
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute parallel for simd num_teams(C)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for simd num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for simd num_teams(argc + argc)
+#pragma omp target teams distribute parallel for simd num_teams(argc + argc/z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for simd num_teams (argc + argc)
+#pragma omp target teams distribute parallel for simd num_teams (argc + argc-z)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for simd num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, k;
#pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd num_threads (argc)
+#pragma omp target teams distribute parallel for simd num_threads (argc + k)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, k;
#pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -121,7 +121,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -210,7 +210,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T z;
// expected-error at +1 {{expected '(' after 'schedule'}}
#pragma omp target teams distribute parallel for simd schedule
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -50,7 +51,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
-#pragma omp target teams distribute parallel for simd schedule (dynamic, 1))
+#pragma omp target teams distribute parallel for simd schedule (dynamic, 1 + z))
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target teams distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
@@ -81,6 +82,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
// expected-error at +1 {{expected '(' after 'schedule'}}
#pragma omp target teams distribute parallel for simd schedule
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
@@ -117,7 +119,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd schedule (static, 2+2))
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : z)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'schedule' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute parallel for simd shared // expected-error {{expected '(' after 'shared'}}
for (int j=0; j<100; j++) foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd shared (S1) // expected-error {{'S1' does not refer to a value}}
for (int j=0; j<100; j++) foo();
- #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f)
+ #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f, z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd shared (argv[1]) // expected-error {{expected variable name}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -33,9 +33,9 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{expression is not an integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
- for (int i = ST; i < N; i++)
+ for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-
+
#pragma omp target teams distribute parallel for simd safelen (ST // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -45,7 +45,7 @@ T tmain(T argc, S **argv) { //expected-n
argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target teams distribute parallel for simd safelen ((ST > 0) ? 1 + ST : 2)
- for (int i = ST; i < N; i++)
+ for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-
+
#if __cplusplus >= 201103L
// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute parallel for simd thread_limit(C)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd thread_limit(argc + argc)
+#pragma omp target teams distribute parallel for simd thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
for (int j=0; j<100; j++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd thread_limit (argc + argc)
+#pragma omp target teams distribute parallel for simd thread_limit (argc + argc-z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute parallel for thread_limit(C)
for (int j=0; j<100; j++) foo();
@@ -38,7 +39,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for thread_limit(argc + argc)
+#pragma omp target teams distribute parallel for thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
@@ -60,6 +61,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -78,7 +80,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute parallel for thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for thread_limit (argc + argc)
+#pragma omp target teams distribute parallel for thread_limit (argc -z + argc)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -213,7 +213,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -12,7 +12,7 @@ bool foobool(int argc) {
struct S1; // expected-note {{declared here}}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute simd device // expected-error {{expected '(' after 'device'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd device (argc + argc)
+#pragma omp target teams distribute simd device (argc + argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'device' clause}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
#pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd firstprivate(da)
+#pragma omp target teams distribute simd firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd firstprivate(S2::S2s)
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd if(argc)
+#pragma omp target teams distribute simd if(argc * z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if(target // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
@@ -57,7 +57,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -88,7 +88,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if(target: argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd if(target: argc)
+#pragma omp target teams distribute simd if(target: z/argc)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd if(target : argc) if (distribute:argc) // expected-error {{directive name modifier 'distribute' is not allowed for '#pragma omp target teams distribute simd'}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
#pragma omp target teams distribute simd lastprivate(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
-#pragma omp target teams distribute simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp target teams distribute simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target teams distribute simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
float k;
#pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd lastprivate(2 * 2) // expected-error {{expected variable name}}
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd lastprivate(ba)
+#pragma omp target teams distribute simd lastprivate(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -61,7 +61,7 @@ T tmain(T argc) {
T &j = i;
T *k = &j;
T x;
- T y;
+ T y, z;
T to, tofrom, always;
const T (&l)[5] = da;
@@ -102,7 +102,7 @@ T tmain(T argc) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(S2::S2sc)
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd map(x)
+#pragma omp target teams distribute simd map(x, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(to: x)
for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
int &j = i;
int *k = &j;
int x;
- int y;
+ int y, z;
int to, tofrom, always;
const int (&l)[5] = da;
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(argv[1])
for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd map(ba)
+#pragma omp target teams distribute simd map(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(ca)
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}}
#pragma omp target teams distribute simd
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute simd num_teams(C)
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute simd num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -26,7 +27,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute simd num_teams(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute simd num_teams(argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
+#pragma omp target teams distribute simd num_teams(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -59,7 +61,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd num_teams (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute simd num_teams (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
+#pragma omp target teams distribute simd num_teams (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 }; // expected-note {{'da' defined here}}
S4 e(4);
S5 g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp target teams distribute simd private // expected-error {{expected '(' after 'private'}}
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
for (int k = 0; k < argc; ++k) ++k;
-#pragma omp target teams distribute simd private (argv[1]) // expected-error {{expected variable name}}
+#pragma omp target teams distribute simd private (k, argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target teams distribute simd private(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams distribute simd' directive}}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -121,9 +121,9 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute simd reduction(* : ca, z) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams distribute simd shared // expected-error {{expected '(' after 'shared'}}
for (int j=0; j<100; j++) foo();
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int j=0; j<100; j++) foo();
- #pragma omp target teams distribute simd shared (argc)
+ #pragma omp target teams distribute simd shared (argc, z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd shared (S1) // expected-error {{'S1' does not refer to a value}}
for (int j=0; j<100; j++) foo();
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams distribute simd thread_limit(C)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd thread_limit(argc + argc)
+#pragma omp target teams distribute simd thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}}
for (int j=0; j<100; j++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams distribute simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd thread_limit (argc + argc)
+#pragma omp target teams distribute simd thread_limit (argc + argc - z)
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
const int da[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams firstprivate // expected-error {{expected '(' after 'firstprivate'}}
foo();
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target teams allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams' directive}}
foo();
-#pragma omp target teams firstprivate(ca)
+#pragma omp target teams firstprivate(ca, z)
foo();
#pragma omp target teams firstprivate(da)
foo();
Modified: cfe/trunk/test/OpenMP/target_teams_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp target teams if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -21,7 +22,7 @@ int tmain(T argc, S **argv) {
foo();
#pragma omp target teams if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
-#pragma omp target teams if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}}
+#pragma omp target teams if (z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}}
foo();
#pragma omp target teams if (argc > 0 ? argv[1] : argv[2])
foo();
@@ -52,6 +53,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams if // expected-error {{expected '(' after 'if'}}
foo();
#pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -80,7 +82,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target teams if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
foo();
-#pragma omp target teams if(target : argc)
+#pragma omp target teams if(target : z)
foo();
#pragma omp target teams if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_teams_is_device_ptr_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_is_device_ptr_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_is_device_ptr_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_is_device_ptr_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
struct ST {
int *a;
};
Modified: cfe/trunk/test/OpenMP/target_teams_map_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_map_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_map_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_map_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
#ifdef CCODE
void foo(int arg) {
const int n = 0;
Modified: cfe/trunk/test/OpenMP/target_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams num_teams(C)
foo();
#pragma omp target teams num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
foo();
#pragma omp target teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
-#pragma omp target teams num_teams(argc + argc)
+#pragma omp target teams num_teams(argc + argc + z)
foo();
#pragma omp target teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}}
foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams num_teams // expected-error {{expected '(' after 'num_teams'}}
foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
-#pragma omp target teams num_teams (argc + argc)
+#pragma omp target teams num_teams (argc + argc*z)
foo();
#pragma omp target teams num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}}
Modified: cfe/trunk/test/OpenMP/target_teams_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 }; // expected-note {{'da' defined here}}
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target teams private // expected-error {{expected '(' after 'private'}}
foo();
@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target teams firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}
foo();
-#pragma omp target teams private(i)
+#pragma omp target teams private(i, z)
foo();
#pragma omp target teams private(j)
foo();
Modified: cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
foo();
#pragma omp target teams reduction(^ : T) // expected-error {{'T' does not refer to a value}}
foo();
-#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
foo();
#pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
foo();
@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -219,7 +219,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target teams reduction(~ : argc) // expected-error {{expected unqualified-id}}
foo();
-#pragma omp target teams reduction(&& : argc)
+#pragma omp target teams reduction(&& : argc, z)
foo();
#pragma omp target teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
foo();
Modified: cfe/trunk/test/OpenMP/target_teams_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_teams_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target teams thread_limit(C)
foo();
#pragma omp target teams thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
foo();
#pragma omp target teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
-#pragma omp target teams thread_limit(argc + argc)
+#pragma omp target teams thread_limit(argc + argc + z)
foo();
#pragma omp target teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}}
foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target teams thread_limit // expected-error {{expected '(' after 'thread_limit'}}
foo();
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
#pragma omp target teams thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
-#pragma omp target teams thread_limit (argc + argc)
+#pragma omp target teams thread_limit (argc + argc/ z)
foo();
#pragma omp target teams thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}}
Modified: cfe/trunk/test/OpenMP/target_update_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_update_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_device_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_device_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,14 +13,14 @@ struct S1; // expected-note 2 {{declared
template <class T, class S>
int tmain(T argc, S **argv) {
- int i;
+ int i, z;
#pragma omp target update to(i) device // expected-error {{expected '(' after 'device'}}
#pragma omp target update to(i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(i) device () // expected-error {{expected expression}}
#pragma omp target update to(i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}}
#pragma omp target update from(i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-#pragma omp target update from(i) device (argc + argc)
+#pragma omp target update from(i) device (argc + z)
#pragma omp target update from(i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}}
#pragma omp target update from(i) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target update from(i) device (3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
@@ -28,14 +28,14 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int j;
+ int j, z;
#pragma omp target update to(j) device // expected-error {{expected '(' after 'device'}}
#pragma omp target update from(j) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(j) device () // expected-error {{expected expression}}
#pragma omp target update from(j) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(j) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}}
#pragma omp target update from(j) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-#pragma omp target update to(j) device (argc + argc)
+#pragma omp target update to(j) device (z + argc)
#pragma omp target update from(j) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}}
#pragma omp target update to(j) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target update from(j) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
Modified: cfe/trunk/test/OpenMP/target_update_from_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_from_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_from_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_from_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_update_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -24,11 +24,11 @@ int tmain(T argc, S **argv) {
#pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}}
#pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(n) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update to(n) if(argc)
+#pragma omp target update to(n) if(argc + n)
#pragma omp target update from(n) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(n) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update to(n) if(target update : argc)
+#pragma omp target update to(n) if(target update : argc + n)
#pragma omp target update from(n) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}}
#pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}}
#pragma omp target update from(n) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
#pragma omp target update to(m) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(m) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update from(m) if(target update : argc)
+#pragma omp target update from(m) if(target update : argc + m)
#pragma omp target update to(m) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}}
#pragma omp target update from(m) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}}
#pragma omp target update to(m) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
Modified: cfe/trunk/test/OpenMP/target_update_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/target_update_nowait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_nowait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_nowait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_nowait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
int main(int argc, char **argv) {
int i;
Modified: cfe/trunk/test/OpenMP/target_update_to_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_update_to_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_update_to_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_update_to_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/task_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/task_depend_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_depend_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_depend_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_depend_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/task_final_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_final_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_final_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_final_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,11 +13,12 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp task final // expected-error {{expected '(' after 'final'}}
#pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task final () // expected-error {{expected expression}}
#pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task final (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
#pragma omp task final (argc > 0 ? argv[1] : argv[2])
#pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
#pragma omp task final (S) // expected-error {{'S' does not refer to a value}}
@@ -30,11 +31,12 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp task final // expected-error {{expected '(' after 'final'}}
#pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task final () // expected-error {{expected expression}}
#pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task final (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
#pragma omp task final (argc > 0 ? argv[1] : argv[2])
#pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
#pragma omp task final (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/task_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
const int da[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
static int m;
#pragma omp task firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -106,7 +106,7 @@ int main(int argc, char **argv) {
#pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
#pragma omp task firstprivate(argv[1]) // expected-error {{expected variable name}}
#pragma omp task allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}}
-#pragma omp task firstprivate(ca)
+#pragma omp task firstprivate(ca,z )
#pragma omp task firstprivate(da)
#pragma omp task firstprivate(S2::S2s)
#pragma omp task firstprivate(S2::S2sc)
Modified: cfe/trunk/test/OpenMP/task_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp task if // expected-error {{expected '(' after 'if'}}
#pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if () // expected-error {{expected expression}}
@@ -23,7 +24,7 @@ int tmain(T argc, S **argv) {
#pragma omp task if (S) // expected-error {{'S' does not refer to a value}}
#pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp task if(argc)
+ #pragma omp task if(argc + z)
#pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if(task : argc)
@@ -36,6 +37,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp task if // expected-error {{expected '(' after 'if'}}
#pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if () // expected-error {{expected expression}}
@@ -50,7 +52,7 @@ int main(int argc, char **argv) {
#pragma omp task if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
- #pragma omp task if(task : argc)
+ #pragma omp task if(task : argc + z)
#pragma omp task if(task : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp task'}}
#pragma omp task if(task : argc) if (task:argc) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause with 'task' name modifier}}
#pragma omp task if(task : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
Modified: cfe/trunk/test/OpenMP/task_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/task_priority_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_priority_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_priority_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_priority_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,12 +13,13 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp task priority // expected-error {{expected '(' after 'priority'}}
#pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task priority () // expected-error {{expected expression}}
#pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
- #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] + z)
#pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
#pragma omp task priority (S) // expected-error {{'S' does not refer to a value}}
#pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -30,12 +31,13 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+int z;
#pragma omp task priority // expected-error {{expected '(' after 'priority'}}
#pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task priority () // expected-error {{expected expression}}
#pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
- #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] - z)
#pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
#pragma omp task priority (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/task_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
const int da[5] = {0}; // expected-note {{'da' defined here}}
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp task private // expected-error {{expected '(' after 'private'}}
#pragma omp task private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
#pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
#pragma omp task private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}}
#pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}}
-#pragma omp task private(a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
+#pragma omp task private(z, a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
#pragma omp task private(argv[1]) // expected-error {{expected variable name}}
#pragma omp task private(ba) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
#pragma omp task private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}}
Modified: cfe/trunk/test/OpenMP/task_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/task_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
const int da[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp task shared // expected-error {{expected '(' after 'shared'}}
foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp task shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
foo();
-#pragma omp task shared(argc)
+#pragma omp task shared(argc, z)
foo();
#pragma omp task shared(S1) // expected-error {{'S1' does not refer to a value}}
foo();
Modified: cfe/trunk/test/OpenMP/taskgroup_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskgroup_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskgroup_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskgroup_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
int foo();
Modified: cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -85,7 +85,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -137,7 +137,7 @@ T tmain(T argc) {
foo();
#pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}}
foo();
#pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable overloaded '='}}
foo();
#pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
Modified: cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
// expected-error at +2 2 {{expression is not an integral constant expression}}
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
- #pragma omp taskloop collapse (argc
+ #pragma omp taskloop collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/taskloop_final_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_final_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_final_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_final_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop final // expected-error {{expected '(' after 'final'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2])
+#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}}
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop final // expected-error {{expected '(' after 'final'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2])
+#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] - z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}}
Modified: cfe/trunk/test/OpenMP/taskloop_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -119,7 +119,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp taskloop firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
+#pragma omp taskloop firstprivate(z, e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/taskloop_grainsize_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_grainsize_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_grainsize_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_grainsize_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}}
Modified: cfe/trunk/test/OpenMP/taskloop_in_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_in_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_in_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_in_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
Modified: cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -121,7 +121,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp taskloop lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp taskloop lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp taskloop lastprivate(argc)
+#pragma omp taskloop lastprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/taskloop_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/taskloop_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp taskloop'}}
#pragma omp taskloop
Modified: cfe/trunk/test/OpenMP/taskloop_num_tasks_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_num_tasks_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_num_tasks_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_num_tasks_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}}
Modified: cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] - z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
Modified: cfe/trunk/test/OpenMP/taskloop_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
#pragma omp taskloop private(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp taskloop private(e, g)
+#pragma omp taskloop private(e, g, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp taskloop private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -244,7 +244,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop private(j)
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp taskloop private(i)
+#pragma omp taskloop private(i, z)
for (int k = 0; k < argc; ++k)
++k;
static int si;
Modified: cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -104,7 +104,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -149,7 +149,7 @@ T tmain(T argc) {
#pragma omp taskloop reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp taskloop reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -265,7 +265,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop reduction(&& : argc)
+#pragma omp taskloop reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_final_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_final_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_final_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_final_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+#pragma omp taskloop simd final(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2])
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -63,7 +65,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+#pragma omp taskloop simd final(z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2])
Modified: cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
C g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -115,7 +115,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp taskloop simd firstprivate(argv[1]) // expected-error {{expected variable name}}
+#pragma omp taskloop simd firstprivate(z, argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -182,7 +182,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -209,7 +209,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp taskloop simd firstprivate(argc)
+#pragma omp taskloop simd firstprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/taskloop_simd_grainsize_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_grainsize_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_grainsize_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_grainsize_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+ #pragma omp taskloop simd grainsize (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+ #pragma omp taskloop simd grainsize (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
Modified: cfe/trunk/test/OpenMP/taskloop_simd_in_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_in_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_in_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_in_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -125,7 +125,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -163,8 +163,8 @@ T tmain(T argc) {
#pragma omp taskloop simd in_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskgroup task_reduction(|:argc) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
-#pragma omp taskloop simd in_reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp taskgroup task_reduction(|:z) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp taskloop simd in_reduction(| : z, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd in_reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}}
@@ -268,7 +268,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -308,8 +308,8 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd in_reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskgroup task_reduction(&&:argc)
-#pragma omp taskloop simd in_reduction(&& : argc)
+#pragma omp taskgroup task_reduction(&&:argc, z)
+#pragma omp taskloop simd in_reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd in_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -113,7 +113,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
-#pragma omp taskloop simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp taskloop simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp parallel
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp parallel
#pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
-#pragma omp taskloop simd lastprivate(argc)
+#pragma omp taskloop simd lastprivate(argc, z)
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel
Modified: cfe/trunk/test/OpenMP/taskloop_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -113,7 +113,7 @@ S3 h;
template<class I, class C> int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -149,7 +149,7 @@ template<class I, class C> int foomain(I
for (int k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp taskloop simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+ #pragma omp taskloop simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -204,7 +204,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
for (int k = 0; k < argc; ++k) ++k;
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp taskloop simd linear (argc)
+ #pragma omp taskloop simd linear (argc, z)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
for (int k = 0; k < argc; ++k) ++k;
Modified: cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/taskloop_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_misc_messages.c?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_misc_messages.c Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
// expected-error at +1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}}
#pragma omp taskloop simd
Modified: cfe/trunk/test/OpenMP/taskloop_simd_num_tasks_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_num_tasks_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_num_tasks_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_num_tasks_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_priority_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_priority_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_priority_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_priority_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
+ T z;
#pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
#pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+ #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}}
for (int i = 0; i < 10; ++i)
foo();
@@ -63,7 +65,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 0; i < 10; ++i)
foo();
- #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+ #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
Modified: cfe/trunk/test/OpenMP/taskloop_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
#pragma omp taskloop simd private(argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp taskloop simd private(e, g)
+#pragma omp taskloop simd private(e, g, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp taskloop simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
S5 g(5);
S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
S7<S6<float> > s7(0.0) , s7_0(1.0);
- int i;
+ int i, z;
int &j = i;
#pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}}
for (int k = 0; k < argc; ++k)
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp taskloop simd private(argc)
+#pragma omp taskloop simd private(argc, z)
for (int k = 0; k < argc; ++k)
++k;
#pragma omp taskloop simd private(S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -104,7 +104,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -161,7 +161,7 @@ T tmain(T argc) {
#pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp taskloop simd reduction(* : z, ca) // expected-error {{const-qualified variable cannot be reduction}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}}
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -265,7 +265,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp taskloop simd reduction(&& : argc)
+#pragma omp taskloop simd reduction(&& : argc, z)
for (int i = 0; i < 10; ++i)
foo();
#pragma omp taskloop simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/taskloop_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
// expected-error at +2 2 {{expression is not an integral constant expression}}
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
- #pragma omp taskloop simd simdlen (argc
+ #pragma omp taskloop simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp taskloop simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
Modified: cfe/trunk/test/OpenMP/taskwait_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskwait_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskwait_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskwait_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
template <class T>
T tmain(T argc) {
Modified: cfe/trunk/test/OpenMP/taskyield_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskyield_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskyield_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskyield_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
template <class T>
T tmain(T argc) {
Modified: cfe/trunk/test/OpenMP/teams_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target
#pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1<<z) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute firstprivate(ba)
+#pragma omp teams distribute firstprivate(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/teams_distribute_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute num_teams(C)
for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute num_teams(argc + argc)
+#pragma omp teams distribute num_teams(argc + argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target
#pragma omp teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute num_teams (argc + argc)
+#pragma omp teams distribute num_teams (argc + argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target
#pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target
@@ -116,7 +116,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for firstprivate(da)
+#pragma omp teams distribute parallel for firstprivate(da, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target
#pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -45,7 +45,7 @@ int tmain(T argc, S **argv) {
#pragma omp teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for if(argc)
+#pragma omp teams distribute parallel for if(argc+z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -76,7 +76,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -123,7 +123,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for if(parallel : argc)
+#pragma omp teams distribute parallel for if(parallel : argc + z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp teams distribute parallel for'}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute parallel for num_teams(C)
for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for num_teams(argc + argc)
+#pragma omp teams distribute parallel for num_teams(argc + argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target
#pragma omp teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for num_teams (argc + argc)
+#pragma omp teams distribute parallel for num_teams (argc + argc - z)
for (int i=0; i<100; i++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams distribute parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -261,7 +261,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp teams distribute parallel for reduction(^ : z, fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
+ T k;
// expected-error at +2 {{expected '(' after 'schedule'}}
#pragma omp target
#pragma omp teams distribute parallel for schedule
@@ -85,7 +86,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
-#pragma omp teams distribute parallel for schedule (dynamic, 1)
+#pragma omp teams distribute parallel for schedule (dynamic, k)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 {{argument to 'schedule' clause must be a strictly positive integer value}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target
#pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1*z) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z>>1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, z;
int &j = i;
#pragma omp target
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd firstprivate(ba)
+#pragma omp teams distribute parallel for simd firstprivate(ba, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) {
- T i;
+ T i, z;
#pragma omp target
#pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -33,7 +33,7 @@ int tmain(T argc, S **argv) {
#pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}}
+#pragma omp teams distribute parallel for simd if (foobool(argc)*z), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd if (S) // expected-error {{'S' does not refer to a value}}
@@ -76,7 +76,7 @@ int tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, z;
#pragma omp target
#pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
for (i = 0; i < argc; ++i) foo();
@@ -90,7 +90,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd if (argc/z)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
-#pragma omp teams distribute parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp teams distribute parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd lastprivate(argc)
+#pragma omp teams distribute parallel for simd lastprivate(argc, z)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T k;
#pragma omp target
#pragma omp teams distribute parallel for simd num_teams(C)
for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd num_teams(argc + argc)
+#pragma omp teams distribute parallel for simd num_teams(argc + k)
for (int i=0; i<100; i++) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int k;
#pragma omp target
#pragma omp teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd num_teams (argc + argc)
+#pragma omp teams distribute parallel for simd num_teams (argc + k)
for (int i=0; i<100; i++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
void foo() {
}
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared h
template <class T, typename S, int N> // expected-note {{declared here}}
T tmain(T argc, S **argv) {
- T i;
+ T i, k;
#pragma omp target
#pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
@@ -27,7 +27,7 @@ T tmain(T argc, S **argv) {
#pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
@@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int i;
+ int i, k;
#pragma omp target
#pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
for (i = 0; i < argc; ++i) foo();
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -34,7 +34,7 @@ class S4 {
public:
S4(int v):a(v) { }
};
-class S5 {
+class S5 {
int a;
S5():a(0) {} // expected-note {{implicitly declared private here}}
public:
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd reduction(&& : argc)
+#pragma omp teams distribute parallel for simd reduction(&& : argc, z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute parallel for simd thread_limit(C)
for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd thread_limit(argc + argc)
+#pragma omp teams distribute parallel for simd thread_limit(argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd thread_limit (argc + argc)
+#pragma omp teams distribute parallel for simd thread_limit (argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute parallel for thread_limit(C)
for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for thread_limit(argc + argc)
+#pragma omp teams distribute parallel for thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for thread_limit (argc + argc)
+#pragma omp teams distribute parallel for thread_limit (argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -135,7 +135,7 @@ T tmain(T argc) {
#pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp teams distribute reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
@@ -203,7 +203,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -303,7 +303,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute reduction(+ : fl)
+#pragma omp teams distribute reduction(+ : fl, z)
for (int j=0; j<100; j++) foo();
static int m;
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_aligned_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_aligned_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
struct B {
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_collapse_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_collapse_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_default_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_default_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_default_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_default_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo();
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
void foo() {
}
@@ -16,7 +16,7 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
char ** argv;
static T a;
-// CHECK: static T a;
+ T z;
#pragma omp target
#pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
S6 p;
- int i;
+ int i, k;
int &j = i;
#pragma omp target
@@ -100,7 +100,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute simd firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}}
+#pragma omp teams distribute simd firstprivate (k, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
int foomain(int argc, char **argv) {
I e(4);
I g(5);
- int i;
+ int i, k;
int &j = i;
#pragma omp target
#pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
-#pragma omp teams distribute simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp teams distribute simd lastprivate(k, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
S5 g(5);
S3 m;
S6 n(2);
- int i;
+ int i, k;
int &j = i;
#pragma omp target
#pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -206,7 +206,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp target
-#pragma omp teams distribute simd lastprivate(ba)
+#pragma omp teams distribute simd lastprivate(ba, k)
for (i = 0; i < argc; ++i) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_linear_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_linear_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_linear_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_linear_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
class S {
int a;
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute simd num_teams(C)
for (int i=0; i<100; i++) foo();
@@ -42,7 +43,7 @@ T tmain(T argc) {
#pragma omp teams distribute simd num_teams(argc + argc)
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}}
+#pragma omp teams distribute simd num_teams(argc + z), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo();
#pragma omp target
#pragma omp teams distribute simd num_teams(S1) // expected-error {{'S1' does not refer to a value}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute simd num_teams (argc + argc)
+#pragma omp teams distribute simd num_teams (argc + argc + z)
for (int i=0; i<100; i++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -34,7 +34,7 @@ class S4 {
public:
S4(int v):a(v) { }
};
-class S5 {
+class S5 {
int a;
S5():a(0) {} // expected-note {{implicitly declared private here}}
public:
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -156,7 +156,7 @@ T tmain(T argc) {
#pragma omp teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp teams distribute simd reduction(+ : z, o) // expected-error 2 {{no viable overloaded '='}}
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute simd reduction(&& : argc)
+#pragma omp teams distribute simd reduction(&& : argc, z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_safelen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_safelen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams distribute simd shared // expected-error {{expected '(' after 'shared'}}
@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
#pragma omp teams distribute simd shared(da)
for (int j=0; j<100; j++) foo();
#pragma omp target
- #pragma omp teams distribute simd shared(e, g)
+ #pragma omp teams distribute simd shared(e, g, z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute simd shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute simd thread_limit(C)
for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute simd thread_limit(argc + argc)
+#pragma omp teams distribute simd thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute simd thread_limit (argc + argc)
+#pragma omp teams distribute simd thread_limit (argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_distribute_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams distribute thread_limit(C)
for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams distribute thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute thread_limit(argc + argc)
+#pragma omp teams distribute thread_limit(argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
#pragma omp teams distribute thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams distribute thread_limit // expected-error {{expected '(' after 'thread_limit'}}
for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute thread_limit (argc + argc)
+#pragma omp teams distribute thread_limit (argc + argc + z)
for (int j=0; j<100; j++) foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_firstprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_firstprivate_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_firstprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_firstprivate_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
const int da[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
#pragma omp teams firstprivate(argv[1]) // expected-error {{expected variable name}}
foo();
#pragma omp target
-#pragma omp teams firstprivate(ba)
+#pragma omp teams firstprivate(ba, z)
foo();
#pragma omp target
#pragma omp teams firstprivate(ca)
Modified: cfe/trunk/test/OpenMP/teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
void foo() {
}
Modified: cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams num_teams(C)
foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
#pragma omp target
-#pragma omp teams num_teams(argc + argc)
+#pragma omp teams num_teams(argc + argc+z)
foo();
#pragma omp target
#pragma omp teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams num_teams // expected-error {{expected '(' after 'num_teams'}}
foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
-#pragma omp teams num_teams (argc + argc)
+#pragma omp teams num_teams (argc + argc-z)
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_private_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_private_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_private_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_private_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
Modified: cfe/trunk/test/OpenMP/teams_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_reduction_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_reduction_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target
-
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized
extern int omp_default_mem_alloc;
void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()};
- T i;
+ T i, z;
T &j = i; // expected-note 4 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -132,7 +132,7 @@ T tmain(T argc) {
#pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}}
foo();
#pragma omp target
-#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
foo();
#pragma omp target
#pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
int qa[5] = {0};
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -295,7 +295,7 @@ int main(int argc, char **argv) {
#pragma omp teams reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
foo();
#pragma omp target
-#pragma omp teams reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp teams reduction(+ : z, o) // expected-error {{no viable overloaded '='}}
foo();
#pragma omp target
#pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
Modified: cfe/trunk/test/OpenMP/teams_shared_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_shared_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_shared_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_shared_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
void foo() {
}
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
const int da[5] = { 0 };
S4 e(4);
S5 g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp target
#pragma omp teams shared // expected-error {{expected '(' after 'shared'}}
@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
#pragma omp teams shared(da)
foo();
#pragma omp target
- #pragma omp teams shared(e, g)
+ #pragma omp teams shared(e, g, z)
foo();
#pragma omp target
#pragma omp teams shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}}
Modified: cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp?rev=365334&r1=365333&r2=365334&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp Mon Jul 8 08:45:24 2019
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
void foo() {
}
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared
template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) {
char **a;
+ T z;
#pragma omp target
#pragma omp teams thread_limit(C)
foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
#pragma omp teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
foo();
#pragma omp target
-#pragma omp teams thread_limit(argc + argc)
+#pragma omp teams thread_limit(argc + argc + z)
foo();
#pragma omp target
#pragma omp teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
}
int main(int argc, char **argv) {
+ int z;
#pragma omp target
#pragma omp teams thread_limit // expected-error {{expected '(' after 'thread_limit'}}
foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
-#pragma omp teams thread_limit (argc + argc)
+#pragma omp teams thread_limit (argc + argc - z)
foo();
#pragma omp target
More information about the cfe-commits
mailing list