================ @@ -16445,11 +16450,18 @@ OMPClause *SemaOpenMP::ActOnOpenMPMessageClause(Expr *ME, SourceLocation LParenLoc, SourceLocation EndLoc) { assert(ME && "NULL expr in Message clause"); - if (!isa<StringLiteral>(ME)) { + QualType Type = ME->getType(); + if ((!Type->isPointerType() && !Type->isArrayType()) || + !Type->getPointeeOrArrayElementType()->isAnyCharacterType()) { Diag(ME->getBeginLoc(), diag::warn_clause_expected_string) << getOpenMPClauseNameForDiag(OMPC_message); return nullptr; } + + // Convert array type to pointer type if needed. + if (Type->isArrayType()) + ME = SemaRef.DefaultFunctionArrayConversion(ME).get(); ---------------- ro-i wrote:
I just tested it and it doesn't seem to work. The documentation of `DefaultLvalueConversion` says: > DefaultLvalueConversion - performs lvalue-to-rvalue conversion on the > operand. This function is a no-op if the operand has a function type or an > array type. So it won't act on arrays. https://github.com/llvm/llvm-project/pull/146405 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits