r335910 - Revert r335907: [OPENMP] Fix incomplete type check for array reductions

Joel E. Denny via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 12:54:27 PDT 2018


Author: jdenny
Date: Thu Jun 28 12:54:27 2018
New Revision: 335910

URL: http://llvm.org/viewvc/llvm-project?rev=335910&view=rev
Log:
Revert r335907: [OPENMP] Fix incomplete type check for array reductions

Sorry, forgot to add commit log attributes again.

Removed:
    cfe/trunk/test/OpenMP/parallel_reduction_messages.c
Modified:
    cfe/trunk/lib/Sema/SemaOpenMP.cpp

Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=335910&r1=335909&r2=335910&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Thu Jun 28 12:54:27 2018
@@ -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, D->getType(),
+    if (S.RequireCompleteType(ELoc, Type,
                               diag::err_omp_reduction_incomplete_type))
       continue;
     // OpenMP [2.14.3.6, reduction clause, Restrictions]

Removed: cfe/trunk/test/OpenMP/parallel_reduction_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_reduction_messages.c?rev=335909&view=auto
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_reduction_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_reduction_messages.c (removed)
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-
-int incomplete[];
-
-void test() {
-#pragma omp parallel reduction(+ : incomplete) // expected-error {{a reduction list item with incomplete type 'int []'}}
-  ;
-}
-
-// complete to suppress an additional warning, but it's too late for pragmas
-int incomplete[3];




More information about the cfe-commits mailing list