-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[OpenMP][Clang] Enable inscan modifier for generic datatypes #82220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang Author: Animesh Kumar (animeshk-amd) ChangesThis patch fixes the #67002 ([OpenMP][Clang] Scan Directive not supported for Generic types). It disables the Sema checks/analysis that are run on the helper arrays which go into the implementation of the Full diff: https://github.com/llvm/llvm-project/pull/82220.diff 1 Files Affected:
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 7f75cfc5b54f35..f4364a259ad57f 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -4962,7 +4962,8 @@ StmtResult Sema::ActOnOpenMPRegionEnd(StmtResult S,
if (RC->getModifier() != OMPC_REDUCTION_inscan)
continue;
for (Expr *E : RC->copy_array_temps())
- MarkDeclarationsReferencedInExpr(E);
+ if (E)
+ MarkDeclarationsReferencedInExpr(E);
}
if (auto *AC = dyn_cast<OMPAlignedClause>(C)) {
for (Expr *E : AC->varlists())
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be merge the two PRs in one?
They both are not independent.
The older PR didn't need to be merged. I've closed that one. This PR is independent. |
Add a test |
25eb567
to
d1bc5c5
Compare
Added a LIT test for the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
811c9af
to
26d8d82
Compare
This patch fixes the llvm#67002 ([OpenMP][Clang] Scan Directive not supported for Generic types). It disables the Sema checks/analysis that are run on the helper arrays which go into the implementation of the `omp scan` directive until the template instantiation happens.
26d8d82
to
b891329
Compare
This patch fixes the #67002 ([OpenMP][Clang] Scan Directive not supported for Generic types). It disables the Sema checks/analysis that are run on the helper arrays which go into the implementation of the
omp scan
directive until the template instantiation happens.Grateful to @alexey-bataev for suggesting these changes.