[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'
Andrzej Warzynski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 11:04:41 PDT 2019
andwar created this revision.
andwar added a reviewer: ABataev.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch implements the basic parsing and semantic analysis of
`#pragma omp declare variant`:
* registers '#pragma omp declare variant' alongside other OpenMP
pragmas
* parses the 'variant(variant-func-id)' clause and verifies that
'variant-func-id' corresponds to a previously declared function
* template-is as 'variant-func-id' is not supported
* '#pragma omp declare variant` is not allowed in front of template
declarations.
Note that this patch will only parse a subset of the required clauses,
e.g. 'variant(variant-func-id)'. Any remaining tokens before
'tok::annot_pragma_openmp_end' are ignored. As per OpenMP 5 spec, this
form of '#pragma omp declare variant' is incomplete and invalid and will
be rejected with an error once the implementation is complete. In the
meantime, this reduced form is treated as valid.
Repository:
rC Clang
https://reviews.llvm.org/D67294
Files:
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/OpenMPKinds.def
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Basic/OpenMPKinds.cpp
lib/CodeGen/CGOpenMPRuntime.cpp
lib/Parse/ParseOpenMP.cpp
lib/Sema/SemaOpenMP.cpp
test/AST/dump.cpp
test/OpenMP/declare_variant_ast_print.c
test/OpenMP/declare_variant_messages.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67294.219142.patch
Type: text/x-patch
Size: 25459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190906/83dc6218/attachment-0001.bin>
More information about the cfe-commits
mailing list