[all-commits] [llvm/llvm-project] 656d02: Stop emit incomplete type error for a variable in ...
jyu2-git via All-commits
all-commits at lists.llvm.org
Tue Aug 3 11:01:49 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 656d02233170e1707d3534b042960b71cf6eb98b
https://github.com/llvm/llvm-project/commit/656d02233170e1707d3534b042960b71cf6eb98b
Author: Jennifer Yu <jennifer.yu at intel.com>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M clang/lib/Sema/SemaOpenMP.cpp
M clang/test/OpenMP/distribute_firstprivate_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
M clang/test/OpenMP/distribute_simd_aligned_messages.cpp
M clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp
M clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp
M clang/test/OpenMP/distribute_simd_linear_messages.cpp
M clang/test/OpenMP/distribute_simd_reduction_messages.cpp
M clang/test/OpenMP/target_map_messages.cpp
M clang/test/OpenMP/target_parallel_for_map_messages.cpp
M clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp
M clang/test/OpenMP/target_parallel_map_messages.cpp
M clang/test/OpenMP/target_simd_map_messages.cpp
M clang/test/OpenMP/target_teams_distribute_map_messages.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
M clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
M clang/test/OpenMP/target_teams_map_messages.cpp
M clang/test/OpenMP/target_update_from_messages.cpp
M clang/test/OpenMP/target_update_messages.cpp
M clang/test/OpenMP/target_update_to_messages.cpp
M clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp
M clang/test/OpenMP/teams_distribute_reduction_messages.cpp
M clang/test/OpenMP/teams_distribute_shared_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
M clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp
M clang/test/OpenMP/teams_firstprivate_messages.cpp
M clang/test/OpenMP/teams_reduction_messages.cpp
M clang/test/OpenMP/teams_shared_messages.cpp
Log Message:
-----------
Stop emit incomplete type error for a variable in a map clause
where should not.
Currently we are using QTy->isIncompleteType(&ND) to check incomplete
type. But before doing that, need to instantiate for a class template
specialization or a class member of a class template specialization,
or an array with known size of such..., so that we know it is really
incomplete type.
To fix this using RequireCompleteType instead.
The new test is added into "test/OpenMP/target_update_messages.cpp"
The different of using RequireCompleteType is when emit incomplete type,
an additional note is also emitted to point to where incomplete type
is declared. Because this change, many tests are needed to be fixed
by adding additional note.
This is to fix https://bugs.llvm.org/show_bug.cgi?id=50508
Differential Revision: https://reviews.llvm.org/D107200
More information about the All-commits
mailing list