[all-commits] [llvm/llvm-project] 86674f: [HLSL] Added HLSL this as a reference

Xiang Li via All-commits all-commits at lists.llvm.org
Mon Nov 7 13:51:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86674f66cc78a1a121d43fe51f076cbfa8710b1a
      https://github.com/llvm/llvm-project/commit/86674f66cc78a1a121d43fe51f076cbfa8710b1a
  Author: Grace Jennings <gracejennings at gmail.com>
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
    M clang/lib/AST/ExprClassification.cpp
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaExprMember.cpp
    M clang/test/AST/HLSL/RWBuffer-AST.hlsl
    A clang/test/AST/HLSL/this-reference-template.hlsl
    A clang/test/AST/HLSL/this-reference.hlsl
    A clang/test/CodeGenHLSL/this-assignment-overload.hlsl
    A clang/test/CodeGenHLSL/this-assignment.hlsl
    A clang/test/CodeGenHLSL/this-reference.hlsl

  Log Message:
  -----------
  [HLSL] Added HLSL this as a reference

This change makes `this` a reference instead of a pointer in
HLSL. HLSL does not have the `->` operator, and accesses through `this`
are with the `.` syntax.

Tests were added and altered to make sure
the AST accurately reflects the types.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list