[clang] [HLSL] Make log10, exp2, sinh overload tests stricter NFC (PR #177495)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 26 09:27:55 PST 2026


=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>,
=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>,
=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>,
=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>,
=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>,
=?utf-8?q?João?= Saffran <joaosaffranllvm at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/177495 at github.com>


bogner wrote:

> While the updates look correct, these tests mostly seem a bit suspicious. This isn't the place to test that we convert various types to float correctly, so I don't think any of the tests for overloads that don't exist make sense here.
> 
> If we want to have tests to make sure we don't have extra overloads (that is, ones that HLSL doesn't define), then we should have a separate test that uses `-Wconversion` and checks that we have diagnostics for the conversions we expect.

After some discussion offline with @V-FEXrt, I've been convinced that having tests that show user code that calls these functions with implicit conversions isn't unreasonable. However, I'd still like to be more explicit about the fact that we do expect these to have implicit conversions. Can we add -Wconversion and -verify-diagnostics so that we can have check lines that we warn about the conversion on these test cases?

https://github.com/llvm/llvm-project/pull/177495


More information about the cfe-commits mailing list