[OpenMP] Context selector extensions for template functions
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 31 May 2020 16:40:09 +0000 (11:40 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 16 Sep 2020 18:37:10 +0000 (13:37 -0500)
commit5c1084e8840b02d410ba125cbba466465242d820
tree2d6bafb7841768565a4ec4ce8f3b0a86d251ea61
parent97652202d1e6964d5d7a1c03a257452c7ad95233
[OpenMP] Context selector extensions for template functions

With this extension the effects of `omp begin declare variant` will be
applied to template function declarations. The behavior is opt-in and
controlled by the `extension(allow_templates)` trait. While generally
useful, this will enable us to implement complex math function calls by
overloading the templates of the standard library with the ones in
libc++.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D85735
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Sema/Sema.h
clang/lib/Headers/openmp_wrappers/cmath
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/AST/ast-dump-openmp-begin-declare-variant_template_2.cpp [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def