diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -18443,11 +18443,8 @@ static bool checkTypeMappable(SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy, bool FullCheck = true) { - NamedDecl *ND; - if (QTy->isIncompleteType(&ND)) { - SemaRef.Diag(SL, diag::err_incomplete_type) << QTy << SR; + if (SemaRef.RequireCompleteType(SL, QTy, diag::err_incomplete_type)) return false; - } if (FullCheck && !SemaRef.CurContext->isDependentContext() && !QTy.isTriviallyCopyableType(SemaRef.Context)) SemaRef.Diag(SL, diag::warn_omp_non_trivial_type_mapped) << QTy << SR; diff --git a/clang/test/OpenMP/distribute_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_firstprivate_messages.cpp --- a/clang/test/OpenMP/distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_firstprivate_messages.cpp @@ -9,7 +9,7 @@ return argc; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp @@ -18,7 +18,7 @@ extern int omp_default_mem_alloc; -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp @@ -11,7 +11,7 @@ return argc; } extern int omp_default_mem_alloc; -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp @@ -36,7 +36,7 @@ foo(); } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp @@ -102,7 +102,7 @@ return 0; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; // expected-note {{'a' declared here}} class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp @@ -17,7 +17,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp @@ -116,7 +116,7 @@ return ind2; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp @@ -35,7 +35,7 @@ foo(); } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_simd_aligned_messages.cpp b/clang/test/OpenMP/distribute_simd_aligned_messages.cpp --- a/clang/test/OpenMP/distribute_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_aligned_messages.cpp @@ -102,7 +102,7 @@ return 0; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; // expected-note {{'a' declared here}} class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp --- a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp @@ -10,7 +10,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp --- a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_simd_linear_messages.cpp b/clang/test/OpenMP/distribute_simd_linear_messages.cpp --- a/clang/test/OpenMP/distribute_simd_linear_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_linear_messages.cpp @@ -116,7 +116,7 @@ return ind2; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp --- a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp @@ -35,7 +35,7 @@ foo(); } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp --- a/clang/test/OpenMP/target_map_messages.cpp +++ b/clang/test/OpenMP/target_map_messages.cpp @@ -448,7 +448,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_map_messages.cpp --- a/clang/test/OpenMP/target_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp --- a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_parallel_map_messages.cpp b/clang/test/OpenMP/target_parallel_map_messages.cpp --- a/clang/test/OpenMP/target_parallel_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_simd_map_messages.cpp b/clang/test/OpenMP/target_simd_map_messages.cpp --- a/clang/test/OpenMP/target_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_simd_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp @@ -18,7 +18,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_teams_map_messages.cpp b/clang/test/OpenMP/target_teams_map_messages.cpp --- a/clang/test/OpenMP/target_teams_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_map_messages.cpp @@ -335,7 +335,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp --- a/clang/test/OpenMP/target_update_from_messages.cpp +++ b/clang/test/OpenMP/target_update_from_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/target_update_messages.cpp b/clang/test/OpenMP/target_update_messages.cpp --- a/clang/test/OpenMP/target_update_messages.cpp +++ b/clang/test/OpenMP/target_update_messages.cpp @@ -185,3 +185,27 @@ return tmain(argc, argv); } + +template struct array { + _Tp & operator[](int __n) noexcept; +}; + +#pragma omp declare target +extern array arr; +#pragma omp end declare target + +void copy_host_to_device() +{ + #pragma omp target update from(arr) // expected-no-error + arr[0] = 0; +} + +struct FOO; // expected-note {{forward declaration of 'FOO'}} +extern FOO a; +template +struct bar { + void func() { + #pragma omp target map(to: a) // expected-error {{incomplete type 'FOO' where a complete type is required}} + foo(); + } +}; diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp --- a/clang/test/OpenMP/target_update_to_messages.cpp +++ b/clang/test/OpenMP/target_update_to_messages.cpp @@ -15,7 +15,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp @@ -18,7 +18,7 @@ ; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp @@ -18,7 +18,7 @@ ; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp @@ -28,7 +28,7 @@ return argc; } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp @@ -9,7 +9,7 @@ return argc; } -struct S1; // expected-note {{declared here}} +struct S1; // expected-note {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp @@ -91,7 +91,7 @@ return 0; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; // expected-note {{'a' declared here}} class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp @@ -19,7 +19,7 @@ ; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp @@ -105,7 +105,7 @@ return ind2; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -28,7 +28,7 @@ return argc; } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp @@ -9,7 +9,7 @@ return argc; } -struct S1; // expected-note {{declared here}} +struct S1; // expected-note {{declared here}} expected-note {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_reduction_messages.cpp --- a/clang/test/OpenMP/teams_distribute_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_reduction_messages.cpp @@ -34,7 +34,7 @@ for (int j=0; j<100; j++) foo(); } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_shared_messages.cpp --- a/clang/test/OpenMP/teams_distribute_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_shared_messages.cpp @@ -9,7 +9,7 @@ return argc; } -struct S1; // expected-note {{declared here}} +struct S1; // expected-note {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp @@ -91,7 +91,7 @@ return 0; } -struct S1; // expected-note 2 {{declared here}} +struct S1; // expected-note 2 {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; // expected-note {{'a' declared here}} class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp @@ -20,7 +20,7 @@ ; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp @@ -12,7 +12,7 @@ return argc; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp @@ -105,7 +105,7 @@ return ind2; } -struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}} +struct S1; // expected-note 2 {{declared here}} expected-note 3 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp @@ -28,7 +28,7 @@ return argc; } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp @@ -9,7 +9,7 @@ return argc; } -struct S1; // expected-note {{declared here}} +struct S1; // expected-note {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_firstprivate_messages.cpp b/clang/test/OpenMP/teams_firstprivate_messages.cpp --- a/clang/test/OpenMP/teams_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_firstprivate_messages.cpp @@ -18,7 +18,7 @@ ; } -struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 2 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_reduction_messages.cpp b/clang/test/OpenMP/teams_reduction_messages.cpp --- a/clang/test/OpenMP/teams_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_reduction_messages.cpp @@ -34,7 +34,7 @@ foo(); } -struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} +struct S1; // expected-note {{declared here}} expected-note 6 {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a; diff --git a/clang/test/OpenMP/teams_shared_messages.cpp b/clang/test/OpenMP/teams_shared_messages.cpp --- a/clang/test/OpenMP/teams_shared_messages.cpp +++ b/clang/test/OpenMP/teams_shared_messages.cpp @@ -8,8 +8,7 @@ bool foobool(int argc) { return argc; } - -struct S1; // expected-note {{declared here}} +struct S1; // expected-note {{declared here}} // expected-note {{forward declaration of 'S1'}} extern S1 a; class S2 { mutable int a;