[PATCH] D71241: [OpenMP][WIP] Use overload centric declare variants

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 23:40:51 PST 2019


jdoerfert added a comment.

In D71241#1787265 <https://reviews.llvm.org/D71241#1787265>, @hfinkel wrote:

> In D71241#1786959 <https://reviews.llvm.org/D71241#1786959>, @jdoerfert wrote:
>
> > In D71241#1786530 <https://reviews.llvm.org/D71241#1786530>, @ABataev wrote:
> >
> > > Most probably, we can use this solution without adding a new expression. `DeclRefExpr` class can contain 2 decls: FoundDecl and the Decl being used. You can use FoundDecl to point to the original function and used decl to point to the function being called in this context. But at first, we need to be sure that we can handle all corner cases correctly.
> >
> >
> > What new expression are you talking about?
>
>
> To be clear, I believe he's talking about the new expression that I proposed we add in order to represent this kind of call. If that's not needed, and we can use the FoundDecl/Decl pair for that purpose, that should also be considered.


So far, I haven't seen a reason why we would need any new expression. If you think we need one, please explain to me why.

FWIW. The only open question I have is with the OpenMP committee, I'll have to figure out if we really want to restrict the variant selection to calls only. Anyway, we can implement it either way in this scheme.

If I get to it tomorrow, I'll split the patch and update it based on my newest version. I'll also write test cases for all the situations we get wrong right now (https://reviews.llvm.org/D71241#1782650).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71241/new/

https://reviews.llvm.org/D71241





More information about the cfe-commits mailing list