[all-commits] [llvm/llvm-project] 0a0fcc: [HLSL] Implement floating literal suffixes (#87270)
Chris B via All-commits
all-commits at lists.llvm.org
Fri Apr 5 11:46:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a0fccfc6c0519402a2566e1f63440410e524d17
https://github.com/llvm/llvm-project/commit/0a0fccfc6c0519402a2566e1f63440410e524d17
Author: Chris B <chris.bieneman at me.com>
Date: 2024-04-05 (Fri, 05 Apr 2024)
Changed paths:
M clang/lib/Sema/SemaExpr.cpp
A clang/test/SemaHLSL/literal_suffixes.hlsl
A clang/test/SemaHLSL/literal_suffixes_no_16bit.hlsl
Log Message:
-----------
[HLSL] Implement floating literal suffixes (#87270)
This change implements the HLSL floating literal suffixes for half and
double literals. The PR for the HLSL language specification for this
behavior is https://github.com/microsoft/hlsl-specs/pull/175.
The TL;DR is that the `h` suffix on floating literals means `half`, and
the `l` suffix means `double`.
The expected behavior and diagnostics are different if native half is
supported. When native half is not enabled half is 32-bit so implicit
conversions to float do not lose precision and do not warn.
In all cases `half` and `float` are distinct types.
Resolves #85712
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list