[clang] [OpenMP][Clang] Handle unsupported inscan modifier for generic types (PR #79431)

Saiyedul Islam via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 12:15:59 PST 2024


================
@@ -19520,6 +19520,13 @@ static bool actOnOMPReductionKindClause(
   bool FirstIter = true;
   for (Expr *RefExpr : VarList) {
     assert(RefExpr && "nullptr expr in OpenMP reduction clause.");
+    if (ClauseKind == OMPC_reduction &&
+        RD.RedModifier == OMPC_REDUCTION_inscan && RefExpr->isTypeDependent()) {
+      S.Diag(RefExpr->getExprLoc(),
+             diag::err_omp_inscan_reduction_on_template_type);
+      continue;
+    }
+
----------------
saiislam wrote:

> This is definetely wrong, templates should be supported

Did you mean that templates are currently supported, or did you mean that they should be supported?

https://github.com/llvm/llvm-project/pull/79431


More information about the cfe-commits mailing list