microsoft / DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement `-Wdouble-promotion` warnings

llvm-beanz opened this issue · comments

Is your feature request related to a problem? Please describe.
This is related to proposal 0017 - Conforming Literals, but not directly part of the feature. To help mitigate issues caused by the change in literal types and how that impacts type promotion ranks the spec proposes implementing the -Wdouble-promotion warning that was added in Clang 3.8.

Describe the solution you'd like
Implement -Wdouble-promotion as implemented in clang to warn on floating point promotions whenever the conversion rank of the target type is less than the source type.

I'm preemptively assigning this to myself since I'll do this as part of #6537. I've filed this as a separate issue because it is separable and the change for #6537 is large enough that it should stand on its own.

Implementing this will depend on #6537 for complete testing, so this will be added after the initial change merges.