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&id=126600#toc
Repository:
rL LLVM
http
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
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
test/OpenMP/declare_target_m
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 || D->isInvalidD
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:
>
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:
>
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 `Dec
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
test/OpenMP/declare_target_m
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 w
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
`c
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)
d2.c:2:
11 matches
Mail list logo