Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflection syntax may be incompatible with OpenMP #33

Open
tambry opened this issue Apr 15, 2024 · 3 comments
Open

Reflection syntax may be incompatible with OpenMP #33

tambry opened this issue Apr 15, 2024 · 3 comments

Comments

@tambry
Copy link

tambry commented Apr 15, 2024

Similar to ObjC's -fblocks OpenCL supports blocks started by ^. This check should check LangOpts.Blocks instead.
OpenMP pragmas use syntax such as +:argv[0][:1] so a || LangOpts.OpenMP should also be added.

@tambry tambry changed the title Reflection is incompatible with OpenCL Reflection is incompatible with OpenCL and OpenMP Apr 15, 2024
@katzdm
Copy link
Collaborator

katzdm commented Apr 15, 2024

Hey @tambry ! Thanks for the bug report.

This check should check LangOpts.Blocks instead.

Agreed.

OpenMP pragmas use syntax such as +:argv[0][:1]

I'm aware of the OpenMP case, but what I'm less clear on (due to limited familiarity with OpenMP) it would be sensible for splices to ever appear in OpenMP pragmas - if not, this could maybe be handled by parsing the [: and :] tokens differently when in the context of an OpenMP pragma. If you have an OpenMP background, I'd appreciate any insight you can share here!

@tambry
Copy link
Author

tambry commented Apr 16, 2024

Unfortunately I don't have an OpenMP background so can't help with that. 😞

@katzdm
Copy link
Collaborator

katzdm commented Apr 18, 2024

No worries - I've adopted your suggested LangOpts.Blocks change. For the time being, I'll change this issue name to reflect the uncertain conflict with OpenMP, and will seek further clarification.

@katzdm katzdm changed the title Reflection is incompatible with OpenCL and OpenMP Reflection may be incompatible with OpenMP Apr 18, 2024
@katzdm katzdm changed the title Reflection may be incompatible with OpenMP Reflection syntax may be incompatible with OpenMP May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants