[PATCH] D100860: [C++4OpenCL] Add missing OpenCL specific diagnostics in templates

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 22 09:52:21 PDT 2021


svenvh added a comment.

In D100860#2709057 <https://reviews.llvm.org/D100860#2709057>, @olestrohm wrote:

> The first on explains that `event_t` can't be used in program scope at all, which is better I think.

Agreed, removing the parser check gives a worse diagnostic here.

The underlying problem might actually be that the diagnostic for program scope variables is firing too early.  I tried to address a similar issue with D53705 <https://reviews.llvm.org/D53705>, which got stalled unfortunately.  Perhaps we should revisit that and try to see if postponing the program scope variable diagnostic allows us to remove the parser check without getting a worse diagnostic.


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

https://reviews.llvm.org/D100860



More information about the cfe-commits mailing list