[all-commits] [llvm/llvm-project] b21d2d: [HLSL] Implement 202x conforming literals (#91015)

Chris B via All-commits all-commits at lists.llvm.org
Mon May 6 14:21:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b21d2de661994f37ffb9c79fede3154d96f89db2
      https://github.com/llvm/llvm-project/commit/b21d2de661994f37ffb9c79fede3154d96f89db2
  Author: Chris B <chris.bieneman at me.com>
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/AST/HLSL/vector-constructors.hlsl
    M clang/test/CodeGenHLSL/builtins/ScalarSwizzles.hlsl
    A clang/test/SemaHLSL/Types/Arithmetic/literal_suffixes.hlsl
    A clang/test/SemaHLSL/Types/Arithmetic/literal_suffixes_202x.hlsl
    A clang/test/SemaHLSL/Types/Arithmetic/literal_suffixes_no_16bit.hlsl
    M clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
    R clang/test/SemaHLSL/literal_suffixes.hlsl
    R clang/test/SemaHLSL/literal_suffixes_no_16bit.hlsl

  Log Message:
  -----------
  [HLSL] Implement 202x conforming literals (#91015)

This implements the HLSL 202x conforming literals feature.

The feature proposal is available here:

https://github.com/microsoft/hlsl-specs/blob/main/proposals/0017-conforming-literals.md

The language specification for this behavior is available in (poorly
rendered) HTML or PDF:
https://microsoft.github.io/hlsl-specs/specs/hlsl.html#Lex.Literal.Float
https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf

The main implementation details are:
1) Unsuffixed floating literals are `float`.
2) The integer `ll` suffix specifies `int64_t (aka long)` which is
64-bit because HLSL has no defined `long` keyword or `long long` type.

Resolves #85714



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