[OpenMP] Context selector extensions for return value overloading
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 12 Aug 2020 21:49:10 +0000 (16:49 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 16 Sep 2020 18:37:09 +0000 (13:37 -0500)
commitc4b7a1da9d872ed075ce99c80a90b11a135577a0
tree0e43ea1bbe0ac34da9cc4e34568df984ca1d0491
parent5c63ae156e96a20ce96570d4bd2c48a9c8170a9d
[OpenMP] Context selector extensions for return value overloading

This extension allows to declare variants in between `omp begin/end
declare variant` that do not match the type of the existing function
with that name. Without this extension we would not find a base function
(with a compatible type), therefore create a new one, which would
cause conflicting declarations. With this extension we will not create
"missing" base functions, which basically renders these specializations
harmless. They will be generated but never called.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D85878
clang/include/clang/AST/OpenMPClause.h
clang/include/clang/Basic/AttrDocs.td
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def