HomePhabricator

[OpenMP][FIX] Verify compatible types for declare variant calls

Authored by jdoerfert on Sep 27 2020, 1:52 PM.

Description

[OpenMP][FIX] Verify compatible types for declare variant calls

Especially for templates we need to check at some point if the base
function matches the specialization we might call instead. Before this
lead to the replacement of std::sqrt(int(2)) calls with one that
converts the argument to a std::complex<int>, clearly not the desired
behavior.

Reported as PR47655

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D88384