llvm-project/clang/lib/Sema
Jennifer Yu c274b19866 Add implicit map for a list item appears in a reduction clause.
A new rule is added in 5.0:
If a list item appears in a reduction, lastprivate or linear clause
on a combined target construct then it is treated as if it also appears
in a map clause with a map-type of tofrom.

Currently map clauses for all capture variables are added implicitly.
But missing for list item of expression for array elements or array
sections.

The change is to add implicit map clause for array of elements used in
reduction clause. Skip adding map clause if the expression is not
mappable.
Noted: For linear and lastprivate, since only variable name is
accepted, the map has been added though capture variables.

To do so:
During the mappable checking, if error, ignore diagnose and skip
adding implicit map clause.

The changes:
1> Add code to generate implicit map in ActOnOpenMPExecutableDirective,
   for omp 5.0 and up.
2> Add extra default parameter NoDiagnose in ActOnOpenMPMapClause:
Use that to skip error as well as skip adding implicit map during the
mappable checking.

Note: there are only tow places need to be check for NoDiagnose. Rest
of them either the check is for < omp 5.0 or the error already generated for
reduction clause.

Differential Revision: https://reviews.llvm.org/D108132
2021-08-19 12:53:47 -07:00
..
AnalysisBasedWarnings.cpp [clang] Expose unreachable fallthrough annotation warning 2021-08-16 17:14:55 -07:00
CMakeLists.txt [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
CodeCompleteConsumer.cpp [CodeComplete] Basic code completion for attribute names. 2021-08-12 23:49:10 +02:00
CoroutineStmtBuilder.h
DeclSpec.cpp [CFE][X86] Enable complex _Float16 support 2021-08-18 11:16:14 +08:00
DelayedDiagnostic.cpp
IdentifierResolver.cpp
JumpDiagnostics.cpp [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1 2021-05-17 22:42:17 -07:00
MultiplexExternalSemaSource.cpp [clang][AST] Improve AST Reader/Writer memory footprint 2021-05-20 15:34:29 -07:00
OpenCLBuiltins.td [OpenCL] Make pipes and workgroup optional for -fdeclare-opencl-builtins 2021-08-10 13:01:47 +01:00
ParsedAttr.cpp [Clang] Add an explicit makeArrayRef to appease gcc 5.4. 2021-08-13 09:42:28 -07:00
Scope.cpp
ScopeInfo.cpp [clang] Enable support for #pragma STDC FENV_ACCESS 2020-10-25 06:46:25 -07:00
Sema.cpp [OpenCL] Add support of __opencl_c_pipes feature macro. 2021-07-30 18:10:25 +03:00
SemaAccess.cpp [clang][NFC] Break out BaseUsingDecl from UsingDecl 2021-06-07 06:29:28 -07:00
SemaAttr.cpp Simplify allowing pragma float_control in a linkage specification 2021-07-28 13:29:41 -04:00
SemaAvailability.cpp [clang] RecursiveASTVisitor visits ObjCPropertyRefExpr's class receiver 2021-06-01 14:45:25 -04:00
SemaCUDA.cpp [CUDA][HIP] Promote const variables to constant 2021-06-01 21:28:41 -04:00
SemaCXXScopeSpec.cpp [clang] p1099 using enum part 2 2021-06-08 11:11:46 -07:00
SemaCast.cpp [PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified 2021-07-30 09:35:43 -05:00
SemaChecking.cpp [X86] AVX512FP16 instructions enabling 3/6 2021-08-18 09:03:41 +08:00
SemaCodeComplete.cpp [CodeCompletion] Provide placeholders for known attribute arguments 2021-08-19 14:03:41 +02:00
SemaConcept.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp [clang] NFC: change uses of `Expr->getValueKind` into `is?Value` 2021-07-28 03:09:31 +02:00
SemaDecl.cpp [OpenCL] Clang diagnostics allow reporting C++ for OpenCL version. 2021-08-13 13:55:22 +01:00
SemaDeclAttr.cpp [OpenCL] Clang diagnostics allow reporting C++ for OpenCL version. 2021-08-13 13:55:22 +01:00
SemaDeclCXX.cpp [Sema] Fix -Wparentheses warning from gcc. NFC 2021-08-12 10:05:27 -07:00
SemaDeclObjC.cpp [ObjC] Add a command line flag that disables recognition of objc_direct for testability 2021-04-06 11:17:01 -04:00
SemaExceptionSpec.cpp Disallow narrowing conversions to bool in noexcept specififers 2021-08-06 10:26:39 -04:00
SemaExpr.cpp Revert "[HIP] Allow target addr space in target builtins" 2021-08-18 21:38:42 -06:00
SemaExprCXX.cpp [clang] Add support for optional flag -fnew-infallible to restrict exception propagation 2021-08-02 15:45:06 -07:00
SemaExprMember.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaExprObjC.cpp [Sema] CheckObjCBridgeNSCast - fix dead code warning. NFCI. 2021-08-18 11:53:27 +01:00
SemaFixItUtils.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaInit.cpp [clang] NFC: change uses of `Expr->getValueKind` into `is?Value` 2021-07-28 03:09:31 +02:00
SemaLambda.cpp [clang][patch][FPEnv] Make initialization of C++ globals strictfp aware 2021-07-29 12:02:37 -04:00
SemaLookup.cpp [clang][patch][FPEnv] Make initialization of C++ globals strictfp aware 2021-07-29 12:02:37 -04:00
SemaModule.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
SemaObjCProperty.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaOpenMP.cpp Add implicit map for a list item appears in a reduction clause. 2021-08-19 12:53:47 -07:00
SemaOverload.cpp Disallow narrowing conversions to bool in noexcept specififers 2021-08-06 10:26:39 -04:00
SemaPseudoObject.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaSYCL.cpp Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified." 2021-06-21 13:23:52 -07:00
SemaStmt.cpp Fix unknown parameter Wdocumentation warning. NFC. 2021-08-19 15:40:09 +01:00
SemaStmtAsm.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaStmtAttr.cpp Implemented [[clang::musttail]] attribute for guaranteed tail calls. 2021-04-15 17:12:21 -07:00
SemaTemplate.cpp [clang] fix canonicalization of nested name specifiers 2021-08-03 22:39:48 +02:00
SemaTemplateDeduction.cpp [clang] SIGSEGV at DeduceTemplateArgumentsByTypeMatch 2021-07-30 12:40:38 +03:00
SemaTemplateInstantiate.cpp [clang] fix crash on template instantiation of invalid requires expressions 2021-08-03 23:16:04 +02:00
SemaTemplateInstantiateDecl.cpp [clang][patch][FPEnv] Make initialization of C++ globals strictfp aware 2021-07-29 12:02:37 -04:00
SemaTemplateVariadic.cpp Revert "Following up on PR48517, fix handling of template arguments that refer" 2021-01-20 15:55:35 +01:00
SemaType.cpp [OpenCL] Add support of __opencl_c_3d_image_writes feature macro 2021-07-30 04:54:28 +03:00
TreeTransform.h Add implicit map for a list item appears in a reduction clause. 2021-08-19 12:53:47 -07:00
TypeLocBuilder.cpp
TypeLocBuilder.h
UsedDeclVisitor.h DeferredDiagnosticsEmitter crashes 2020-10-08 11:42:21 -04:00