]> granicus.if.org Git - clang/commitdiff
Revert r335907: [OPENMP] Fix incomplete type check for array reductions
authorJoel E. Denny <jdenny.ornl@gmail.com>
Thu, 28 Jun 2018 19:54:27 +0000 (19:54 +0000)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Thu, 28 Jun 2018 19:54:27 +0000 (19:54 +0000)
Sorry, forgot to add commit log attributes again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335910 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOpenMP.cpp
test/OpenMP/parallel_reduction_messages.c [deleted file]

index 6fb0125e6ebf08e854a2dec25f8baa4a8da07db4..7da9df90acb8768c9ea426ef1cf872c294a6ab54 100644 (file)
@@ -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]
diff --git a/test/OpenMP/parallel_reduction_messages.c b/test/OpenMP/parallel_reduction_messages.c
deleted file mode 100644 (file)
index f88f8e0..0000000
+++ /dev/null
@@ -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];