From 82e9ea5b49bd65ee31b557a72617567a3cb1602c Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Thu, 28 Jun 2018 19:46:10 +0000 Subject: [OPENMP] Fix incomplete type check for array reductions A reduction for an incomplete array type used to produce an assert fail during codegen. Now it produces a diagnostic. llvm-svn: 335907 --- clang/lib/Sema/SemaOpenMP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaOpenMP.cpp') diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 7da9df90acb..6fb0125e6eb 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -10335,7 +10335,7 @@ static bool actOnOMPReductionKindClause( // OpenMP [2.9.3.3, Restrictions, C/C++, p.3] // A variable that appears in a private clause must not have an incomplete // type or a reference type. - if (S.RequireCompleteType(ELoc, Type, + if (S.RequireCompleteType(ELoc, D->getType(), diag::err_omp_reduction_incomplete_type)) continue; // OpenMP [2.14.3.6, reduction clause, Restrictions] -- cgit v1.2.3