[OpenCL] Reduce emitting candidate notes for builtins
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Mon, 27 Jun 2022 08:55:44 +0000 (09:55 +0100)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Mon, 27 Jun 2022 08:55:44 +0000 (09:55 +0100)
commit663e47a50f50c9ff0da9ba805f804c06645638ed
tree6e8ea64769706168541f2faf1a038d6b85727d2a
parent327307d9d4da0045f762f75343fe66b0f10ecc63
[OpenCL] Reduce emitting candidate notes for builtins

When overload resolution fails, clang emits a note diagnostic for each
candidate.  For OpenCL builtins this often leads to many repeated note
diagnostics with no new information.  Stop emitting such notes.

Update a test that was relying on counting those notes to check how
many builtins are available for certain extension configurations.

Differential Revision: https://reviews.llvm.org/D127961
clang/lib/Sema/SemaOverload.cpp
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl