[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-10 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317891: [OpenMP] diagnose assign to firstprivate const, patch by Joel E. Denny (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D39859?vs=122329&id=122434#toc Repository: rL L

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D39859#921780, @jdenny wrote: > Alexey: Thanks for accepting. I do not have commit privileges. Would you > please commit for me? Sure, no problems. https://reviews.llvm.org/D39859 ___ cfe-co

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-10 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Alexey: Thanks for accepting. I do not have commit privileges. Would you please commit for me? https://reviews.llvm.org/D39859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D39859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-09 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 122329. jdenny added a comment. Hi Alexey. Thanks for your comments. This update should address them all. https://reviews.llvm.org/D39859 Files: lib/Sema/SemaExpr.cpp test/OpenMP/parallel_firstprivate_messages.cpp Index: test/OpenMP/parallel_firstpri

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaExpr.cpp:14356 +if (S.IsOpenMPCapturedDecl(Var)) { + bool hasConst = DeclRefType.isConstQualified(); DeclRefType = DeclRefType.getUnqualifiedType(); `hasConst` must start from capital letter

[PATCH] D39859: [OpenMP] diagnose assign to firstprivate const

2017-11-09 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. [OpenMP] diagnose assign to firstprivate const Clang does not diagnose assignments to const variables declared firstprivate. Furthermore, codegen is broken such that, at run time, such assignments simply have no effect. For example, the following prints 0 not 1: i