OMP4 Target Declare parse/sema patch


Trivial patch which implements OMP4 target declare. Can someone please review and push if is acceptable or let me know what needs fixing.

@Intel - I see you guys are missing it as well.. hopefully it helps save you a few minutes.


OMP4-target-declare.diff (20.1 KB)

It’s hard to be sure this is correct since (unless I’m misreading) this code would all be dead right now, since we don’t yet support parsing this directive.

I’d like to see parsing support and testcases before I’d consider this ready to commit. I’m also a bit concerned that (from a skim of the OpenMP documentation) this seems to be an attribute that can be applied to functions and variables, and not a statement, so modeling it as an OMPExecutableDirective might be incorrect.

+case OMPD_declare_update: {

This line is underindented.

Intel already implemented this and I was too quick to hit send. Apologies for the duplicate effort and hopefully this feedback at the very least helps them (or others) in contributing more of their code.

Thanks Richard