[OpenMP][FIX] Allow declare variant to work with reference types
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 26 Aug 2021 18:04:29 +0000 (13:04 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Fri, 27 Aug 2021 18:12:14 +0000 (13:12 -0500)
commit2930c839a5877356db6966409f4f9f2cdbcf3a07
tree181dc61dd11a43efe6f4d16ef048c296b609cc15
parente05940de2a76df8ce77f943d9b8bc81322a03354
[OpenMP][FIX] Allow declare variant to work with reference types

Reference types in the return or parameter position did cause the OpenMP
declare variant overload reasoning to give up. We should allow them as
we allow any other type.

This should fix the bug reported on the mailing list:
https://lists.llvm.org/pipermail/openmp-dev/2021-August/004094.html

Reviewed By: ABataev, pdhaliwal

Differential Revision: https://reviews.llvm.org/D108774
clang/lib/AST/ASTContext.cpp
clang/test/AST/ast-dump-openmp-begin-declare-variant_reference.cpp [new file with mode: 0644]