This is an archive of the discontinued LLVM Phabricator instance.

[Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates
ClosedPublic

Authored by sidorovd on Sep 20 2018, 2:34 AM.

Diff Detail

Repository
rC Clang

Event Timeline

sidorovd created this revision.Sep 20 2018, 2:34 AM
Anastasia added inline comments.Sep 20 2018, 5:08 AM
include/clang/Sema/Sema.h
8585

and extension -> an extension ?

lib/Sema/Sema.cpp
1917

Is this function to be used for both OpenCLDeclExtMap and OpenCLTypeExtMap? If yes, may be we could give it more generic name like 'getOpenCLExtensionsFromExtMap'...

sidorovd updated this revision to Diff 166270.Sep 20 2018, 5:29 AM
sidorovd marked an inline comment as done.
sidorovd added inline comments.
include/clang/Sema/Sema.h
8585

Thanks!

lib/Sema/Sema.cpp
1917

No, this exact function is only for 'OpenCLDeclExtMap', for the type map one should implement a new function 'getOpenCLExtensionsFromTypeExtMap'. Actually I have done this for https://reviews.llvm.org/D51341 to make the patch more generic, but since I'm not sure if it ever came to light I can add it here unused.

Anastasia added inline comments.Sep 21 2018, 12:50 AM
lib/Sema/Sema.cpp
1917

I think it's ok to provide generic helper function even if it's not used currently. But if you don't want to do this is there any value in splitting this into two function and using template?

sidorovd updated this revision to Diff 166425.Sep 21 2018, 2:49 AM

getOpenCLExtensionsFromTypeExtMap was added

Anastasia accepted this revision.Oct 9 2018, 9:22 AM

LGTM! Thanks!

This revision is now accepted and ready to land.Oct 9 2018, 9:22 AM
This revision was automatically updated to reflect the committed changes.