aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2020-05-31 11:40:09 -0500
committerJohannes Doerfert <johannes@jdoerfert.de>2020-09-16 13:37:10 -0500
commit5c1084e8840b02d410ba125cbba466465242d820 (patch)
tree2d6bafb7841768565a4ec4ce8f3b0a86d251ea61 /clang/lib/Parse/ParseOpenMP.cpp
parent97652202d1e6964d5d7a1c03a257452c7ad95233 (diff)
downloadllvm-5c1084e8840b02d410ba125cbba466465242d820.zip
llvm-5c1084e8840b02d410ba125cbba466465242d820.tar.gz
llvm-5c1084e8840b02d410ba125cbba466465242d820.tar.bz2
[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
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 184dd48..34bddd2 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -939,6 +939,10 @@ static bool checkExtensionProperty(Parser &P, SourceLocation Loc,
TraitProperty::implementation_extension_disable_implicit_base)
return true;
+ if (TIProperty.Kind ==
+ TraitProperty::implementation_extension_allow_templates)
+ return true;
+
auto IsMatchExtension = [](OMPTraitProperty &TP) {
return (TP.Kind ==
llvm::omp::TraitProperty::implementation_extension_match_all ||