bloomberg/clang-p2996

Reflection syntax may be incompatible with OpenMP

Opened this issue · 3 comments

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.

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!

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

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.