[PATCH] D135721: [HLSL] Added HLSL this as a reference

Grace Jennings via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 15:29:44 PDT 2022


gracejennings created this revision.
gracejennings added reviewers: python3kgae, beanz, pow2clk, bob80905.
Herald added a subscriber: Anastasia.
Herald added a project: All.
gracejennings requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135721

Files:
  clang/include/clang/AST/ExprCXX.h
  clang/lib/AST/ExprClassification.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/Sema/HLSLExternalSemaSource.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaExprMember.cpp
  clang/test/AST/HLSL/RWBuffer-AST.hlsl
  clang/test/AST/HLSL/this-reference-template.hlsl
  clang/test/AST/HLSL/this-reference.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135721.466943.patch
Type: text/x-patch
Size: 13178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221011/8eea09b3/attachment.bin>


More information about the cfe-commits mailing list