[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320521: [OpenMP] Diagnose function name on the link clause (authored by kli, committed by ). Changed prior to commit: https://reviews.llvm.org/D40968?vs=126217=126600#toc Repository: rL LLVM

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-11 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/D40968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 126217. kkwli0 marked an inline comment as done. https://reviews.llvm.org/D40968 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_target_ast_print.cpp

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 marked an inline comment as done. kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D ||

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D || D->isInvalidDecl()) kkwli0 wrote: >

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D || D->isInvalidDecl()) ABataev wrote: >

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D || D->isInvalidDecl()) You can get

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 126025. kkwli0 marked an inline comment as done. https://reviews.llvm.org/D40968 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_target_ast_print.cpp

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 marked an inline comment as done. kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12576 +if (MT == OMPDeclareTargetDeclAttr::MT_Link && isa(ND)) { + Diag(Id.getLoc(), diag::err_omp_function_in_link_clause); ABataev wrote: > I

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12576 +if (MT == OMPDeclareTargetDeclAttr::MT_Link && isa(ND)) { + Diag(Id.getLoc(), diag::err_omp_function_in_link_clause); I would like to see this some in `check` functions, like

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 created this revision. This patch is to add diagnose when a function name is specified on the link clause. According to the OpenMP spec, only the list items that exclude the function name are allowed on the link clause. void foo() {} #pragma omp declare target link(foo)