[OpenMP] Support nested OpenMP context selectors (declare variant)
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 13 Aug 2020 06:05:51 +0000 (01:05 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 16 Sep 2020 18:37:09 +0000 (13:37 -0500)
commit5c63ae156e96a20ce96570d4bd2c48a9c8170a9d
tree2c06d29391a3235041e9447d45d6d5aeabd00273
parent05fd04eda4b22b09e33753132cbf037a1265c7e2
[OpenMP] Support nested OpenMP context selectors (declare variant)

Due to `omp begin/end declare variant`, OpenMP context selectors can be
nested. This patch adds initial support for this so we can use it for
target math variants. We should improve the detection of "equivalent"
scores and user conditions, we should also revisit the data structures
of the OMPTraitInfo object, however, both are not pressing issues right
now.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D85877
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/AST/ast-dump-openmp-begin-declare-variant_nested.c [new file with mode: 0644]
clang/test/OpenMP/declare_variant_messages.c