Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8557e5b
[LoopInterchange] Reject interchange when a freeze would move or be c…
MattPD Aug 6, 2026
b56b506
[HLSL] Consistently quote resource attribute args (#214106)
bogner Aug 6, 2026
c965558
[LoongArch][MC] Pre-mark align fragments as linker-relaxable (#213582)
wangleiat Aug 6, 2026
9d72ffd
[ELF][AArch64] Do not treat missing build attributes as defined (#213…
igorkudrin Aug 6, 2026
219524b
[LLVM][Docs] Remove bugpoint references
boomanaiden154 Aug 6, 2026
e063f1f
[NPM] Make few more passes required - 2 (#213608)
vikramRH Aug 6, 2026
8ba3d8f
[CIR][SYCL] Support SYCL kernel call statement in host codegen (#213728)
koparasy Aug 6, 2026
3c8a11c
[Fuchsia] Disable per-target runtime directories for Darwin (#214382)
petrhosek Aug 6, 2026
a27b1d9
[CIR][AArch64] Upstream saturating-addition NEON builtins (#213755)
iamvickynguyen Aug 6, 2026
239cbf5
[flang][cuda] Delay box cuf.alloc past host association captures (#21…
wangzpgi Aug 6, 2026
c2f17be
[ORC] Make ExecutionSession non-copyable / non-moveable. (#214231)
lhames Aug 6, 2026
5dc3fcd
[AsmPrinter] Emit STT_OBJECT type and size for jump tables (#214170)
lenary Aug 6, 2026
3214218
[libc++] Add missing return 0 to main functions in tests (#214190)
ldionne Aug 6, 2026
057cc9d
[libc++] Refactor the conditions for enabling assertion tests (#213294)
ldionne Aug 6, 2026
2114567
[libc++] Move lerp to its own header instead of <cmath> (#213111)
ldionne Aug 6, 2026
0b12400
[libc++][test] Fix construction and comparison for testing allocators…
frederick-vs-ja Aug 6, 2026
23d73be
[Support/ELF] Add OpenBSD NT_OPENBSD_PACMASK core note type (#205411)
brad0 Aug 6, 2026
8277177
[Transforms] Delete loop-extract pass
boomanaiden154 Aug 6, 2026
f5fe998
[Transforms] Remove bugpoint references
boomanaiden154 Aug 6, 2026
13e1dd9
[llvm-reduce] Remove outdated bugpoint comment
boomanaiden154 Aug 6, 2026
e4cccd7
[DWARF] Update comment for useSplitDwarf (#214241)
boomanaiden154 Aug 6, 2026
c3a0eb4
[Modules] Don't merge attributes for namespace redeclarations. (#214361)
vsapsai Aug 6, 2026
1ac19e4
[NVVM][NVPTX] Change TMA Tensor reduction ops to use flag for reducti…
rajatbajpai Aug 6, 2026
16a941e
[VPlan][NFC] Speed up getVectorLoopRegion() with a last-successor wal…
madhur13490 Aug 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion clang/cmake/caches/Fuchsia.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ if(APPLE)
set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")

set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64;-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF" CACHE STRING "")
endif()

if(WIN32)
Expand Down Expand Up @@ -142,7 +144,6 @@ else()
set(SANITIZER_TEST_CXX "libc++" CACHE STRING "")
set(SANITIZER_TEST_CXX_INTREE ON CACHE BOOL "")
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "")
endif()

if(BOOTSTRAP_CMAKE_SYSTEM_NAME)
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/AST/TypePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2202,9 +2202,9 @@ void TypePrinter::printHLSLAttributedResourceAfter(
const HLSLAttributedResourceType *T, raw_ostream &OS) {
printAfter(T->getWrappedType(), OS);
const HLSLAttributedResourceType::Attributes &Attrs = T->getAttrs();
OS << " [[hlsl::resource_class("
OS << " [[hlsl::resource_class(\""
<< HLSLResourceClassAttr::ConvertResourceClassToStr(Attrs.ResourceClass)
<< ")]]";
<< "\")]]";
if (Attrs.IsROV)
OS << " [[hlsl::is_rov]]";
if (Attrs.RawBuffer)
Expand All @@ -2225,10 +2225,10 @@ void TypePrinter::printHLSLAttributedResourceAfter(
}

if (Attrs.ResourceDimension != llvm::dxil::ResourceDimension::Unknown)
OS << " [[hlsl::resource_dimension("
OS << " [[hlsl::dimension(\""
<< HLSLResourceDimensionAttr::ConvertResourceDimensionToStr(
Attrs.ResourceDimension)
<< ")]]";
<< "\")]]";
}

void TypePrinter::printHLSLInlineSpirvBefore(const HLSLInlineSpirvType *T,
Expand Down
39 changes: 38 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ deriveNeonSISDIntrinsicOperandTypes(CIRGenFunction &cgf, unsigned modifier,
vecArgTy = cir::VectorType::get(arg0Ty, resVecTy.getSize());
}

// True if `ty` is arg0's type, or an integer of the same width that only
// differs in signedness. vsqadd/vuqadd mix the two on purpose: vsqaddb_u8
// takes a uint8_t and an int8_t, but both become the same vector type.
auto matchesArg0Ty = [&](mlir::Type ty) {
if (ty == arg0Ty)
return true;
auto intTy = mlir::dyn_cast<cir::IntType>(ty);
auto arg0IntTy = mlir::dyn_cast<cir::IntType>(arg0Ty);
return intTy && arg0IntTy && intTy.getWidth() == arg0IntTy.getWidth();
};

// `vecArgTy` is populated by `VectorizeArgTypes` or
// `ArgAsWidenedRetType`. When set, wrap every non-immediate data operand
// that has the same scalar type as arg0. Checking the ICE bitmap prevents
Expand All @@ -312,7 +323,7 @@ deriveNeonSISDIntrinsicOperandTypes(CIRGenFunction &cgf, unsigned modifier,
argTypes.reserve(ops.size());
for (unsigned i = 0, e = ops.size(); i != e; ++i) {
bool isImmediate = iceArguments & (1U << i);
if (vecArgTy && !isImmediate && ops[i].getType() == arg0Ty)
if (vecArgTy && !isImmediate && matchesArg0Ty(ops[i].getType()))
argTypes.push_back(vecArgTy);
else
argTypes.push_back(ops[i].getType());
Expand Down Expand Up @@ -509,6 +520,22 @@ emitCommonNeonSISDBuiltinExpr(CIRGenFunction &cgf,
case NEON::BI__builtin_neon_vqsubs_u32:
case NEON::BI__builtin_neon_vqsubd_s64:
case NEON::BI__builtin_neon_vqsubd_u64:
case NEON::BI__builtin_neon_vqaddb_s8:
case NEON::BI__builtin_neon_vqaddb_u8:
case NEON::BI__builtin_neon_vqaddh_s16:
case NEON::BI__builtin_neon_vqaddh_u16:
case NEON::BI__builtin_neon_vqadds_s32:
case NEON::BI__builtin_neon_vqadds_u32:
case NEON::BI__builtin_neon_vqaddd_s64:
case NEON::BI__builtin_neon_vqaddd_u64:
case NEON::BI__builtin_neon_vsqaddb_u8:
case NEON::BI__builtin_neon_vsqaddh_u16:
case NEON::BI__builtin_neon_vsqadds_u32:
case NEON::BI__builtin_neon_vsqaddd_u64:
case NEON::BI__builtin_neon_vuqaddb_s8:
case NEON::BI__builtin_neon_vuqaddh_s16:
case NEON::BI__builtin_neon_vuqadds_s32:
case NEON::BI__builtin_neon_vuqaddd_s64:
break;
}

Expand Down Expand Up @@ -1237,6 +1264,8 @@ static mlir::Value emitCommonNeonBuiltinExpr(
case NEON::BI__builtin_neon_vhaddq_v:
case NEON::BI__builtin_neon_vhsub_v:
case NEON::BI__builtin_neon_vhsubq_v:
case NEON::BI__builtin_neon_vqadd_v:
case NEON::BI__builtin_neon_vqaddq_v:
case NEON::BI__builtin_neon_vrhadd_v:
case NEON::BI__builtin_neon_vrhaddq_v:
case NEON::BI__builtin_neon_vshl_v:
Expand Down Expand Up @@ -3515,10 +3544,18 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr,
case NEON::BI__builtin_neon_vqtbx2q_v:
case NEON::BI__builtin_neon_vqtbx3q_v:
case NEON::BI__builtin_neon_vqtbx4q_v:
cgm.errorNYI(expr->getSourceRange(),
std::string("unimplemented AArch64 builtin call: ") +
getContext().BuiltinInfo.getName(builtinID));
return mlir::Value{};
case NEON::BI__builtin_neon_vsqadd_v:
case NEON::BI__builtin_neon_vsqaddq_v:
return emitNeonCall(cgm, builder, {ty, ty}, ops, "aarch64.neon.usqadd", ty,
loc);
case NEON::BI__builtin_neon_vuqadd_v:
case NEON::BI__builtin_neon_vuqaddq_v:
return emitNeonCall(cgm, builder, {ty, ty}, ops, "aarch64.neon.suqadd", ty,
loc);
case NEON::BI__builtin_neon_vluti2_laneq_mf8:
case NEON::BI__builtin_neon_vluti2_laneq_bf16:
case NEON::BI__builtin_neon_vluti2_laneq_f16:
Expand Down
6 changes: 6 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class LoopOp;
} // namespace acc
} // namespace mlir

namespace clang {
class SYCLKernelCallStmt;
} // namespace clang

namespace clang::CIRGen {

struct CGCoroData;
Expand Down Expand Up @@ -2295,6 +2299,8 @@ class CIRGenFunction : public CIRGenTypeCache {
bool buildingTopLevelCase);
mlir::LogicalResult emitSwitchStmt(const clang::SwitchStmt &s);

mlir::LogicalResult emitSYCLKernelCallStmt(const SYCLKernelCallStmt &s);

std::optional<mlir::Value>
emitTargetBuiltinExpr(unsigned builtinID, const clang::CallExpr *e,
ReturnValueSlot &returnValue);
Expand Down
17 changes: 17 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,23 @@ void CIRGenModule::emitDeferred() {
curDeclsToEmit.swap(deferredDeclsToEmit);

for (const GlobalDecl &d : curDeclsToEmit) {
// Functions declared with the sycl_kernel_entry_point attribute are
// emitted normally during host compilation. During device compilation, a
// SYCL kernel caller offload entry point function is generated and emitted
// in place of each of these functions.
if (const auto *fd = d.getDecl()->getAsFunction()) {
if (langOpts.SYCLIsDevice && fd->hasAttr<SYCLKernelEntryPointAttr>() &&
fd->isDefined()) {
// Functions with an invalid sycl_kernel_entry_point attribute are
// ignored during device compilation.
if (!fd->getAttr<SYCLKernelEntryPointAttr>()->isInvalidAttr())
errorNYI(fd->getSourceRange(),
"SYCL kernel caller offload entry point");
// Do not emit the sycl_kernel_entry_point attributed function.
continue;
}
}

emitGlobalDecl(d);

// If we found out that we need to emit more decls, do that recursively.
Expand Down
35 changes: 35 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenSYCL.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//===--------- CIRGenSYCL.cpp - Emit CIR for SYCL kernels -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This contains code required for the generation of SYCL kernel code.
//
//===----------------------------------------------------------------------===//

#include "CIRGenFunction.h"

#include "clang/AST/StmtSYCL.h"

using namespace clang;
using namespace clang::CIRGen;

mlir::LogicalResult
CIRGenFunction::emitSYCLKernelCallStmt(const SYCLKernelCallStmt &s) {
// SYCLKernelCallStmt nodes are only present in the bodies of functions
// declared with the sycl_kernel_entry_point attribute. ODR-use of such a
// function in code emitted during device compilation should be diagnosed.
// During device compilation, the offload kernel entry point is emitted in
// place of such a function (see CIRGenModule::emitDeferred), so this
// function is only reached during host compilation.
assert(!getLangOpts().SYCLIsDevice &&
"Attempt to emit a SYCL kernel call statement during device "
"compilation");

// During host compilation, the kernel launch statement is emitted in place
// of the original function body.
return emitStmt(s.getKernelLaunchStmt(), /*useCurrentScope=*/true);
}
4 changes: 3 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtOpenACC.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/AST/StmtSYCL.h"
#include "clang/CIR/MissingFeatures.h"
#include "llvm/Support/SaveAndRestore.h"

Expand Down Expand Up @@ -210,6 +211,8 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
return emitIndirectGotoStmt(cast<IndirectGotoStmt>(*s));
case Stmt::CoreturnStmtClass:
return emitCoreturnStmt(cast<CoreturnStmt>(*s));
case Stmt::SYCLKernelCallStmtClass:
return emitSYCLKernelCallStmt(cast<SYCLKernelCallStmt>(*s));
case Stmt::OpenACCComputeConstructClass:
return emitOpenACCComputeConstruct(cast<OpenACCComputeConstruct>(*s));
case Stmt::OpenACCLoopConstructClass:
Expand Down Expand Up @@ -431,7 +434,6 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
case Stmt::DefaultStmtClass:
case Stmt::CaseStmtClass:
case Stmt::SEHLeaveStmtClass:
case Stmt::SYCLKernelCallStmtClass:
case Stmt::ObjCAtTryStmtClass:
case Stmt::ObjCAtThrowStmtClass:
case Stmt::ObjCAtSynchronizedStmtClass:
Expand Down
1 change: 1 addition & 0 deletions clang/lib/CIR/CodeGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ add_clang_library(clangCIR
CIRGenStmtOpenACC.cpp
CIRGenStmtOpenACCLoop.cpp
CIRGenStmtOpenMP.cpp
CIRGenSYCL.cpp
CIRGenTypes.cpp
CIRGenVTables.cpp
TargetInfo.cpp
Expand Down
11 changes: 3 additions & 8 deletions clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2238,15 +2238,10 @@ bool SemaHLSL::handleResourceTypeAttr(QualType T, const ParsedAttr &AL) {

switch (AL.getKind()) {
case ParsedAttr::AT_HLSLResourceClass: {
if (!AL.isArgIdent(0)) {
Diag(AL.getLoc(), diag::err_attribute_argument_type)
<< AL << AANT_ArgumentIdentifier;
StringRef Identifier;
SourceLocation ArgLoc;
if (!SemaRef.checkStringLiteralArgumentAttr(AL, 0, Identifier, &ArgLoc))
return false;
}

IdentifierLoc *Loc = AL.getArgAsIdent(0);
StringRef Identifier = Loc->getIdentifierInfo()->getName();
SourceLocation ArgLoc = Loc->getLoc();

// Validate resource class value
ResourceClass RC;
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTReaderDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3910,7 +3910,7 @@ void ASTDeclReader::attachPreviousDecl(ASTReader &Reader, Decl *D,

if (PreviousNonLocal) {
if (Sema *S = Reader.getSema()) {
if (auto *ND = dyn_cast<NamedDecl>(D))
if (auto *ND = dyn_cast<NamedDecl>(D); ND && !isa<NamespaceDecl>(ND))
S->mergeDeclAttributes(ND, PreviousNonLocal);
}
}
Expand Down
4 changes: 2 additions & 2 deletions clang/test/AST/HLSL/ByteAddressBuffers-AST.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ RESOURCE Buffer;
// CHECK: CXXRecordDecl {{.*}} implicit referenced class [[RESOURCE]] definition
// CHECK: FinalAttr {{.*}} Implicit final
// CHECK-NEXT: FieldDecl {{.*}} implicit __handle '__hlsl_resource_t
// CHECK-SRV-SAME{LITERAL}: [[hlsl::resource_class(SRV)]]
// CHECK-UAV-SAME{LITERAL}: [[hlsl::resource_class(UAV)]]
// CHECK-SRV-SAME{LITERAL}: [[hlsl::resource_class("SRV")]]
// CHECK-UAV-SAME{LITERAL}: [[hlsl::resource_class("UAV")]]
// CHECK-SAME{LITERAL}: [[hlsl::raw_buffer]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(char8_t)]]

Expand Down
22 changes: 11 additions & 11 deletions clang/test/AST/HLSL/ConstantBuffers-AST.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
// CHECK: CXXRecordDecl {{.*}} ConstantBuffer definition
// CHECK: FinalAttr {{.*}} Implicit final
// CHECK-NEXT: FieldDecl {{.*}} implicit __handle '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]

// CHECK: CXXConstructorDecl {{.*}} ConstantBuffer<element_type> 'void ()' inline
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: BinaryOperator {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' '='
// CHECK-NEXT: MemberExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' lvalue .__handle
// CHECK-NEXT: CXXThisExpr {{.*}} 'hlsl::ConstantBuffer<element_type>' lvalue implicit this
// CHECK-NEXT: CStyleCastExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' <Dependent>
// CHECK-NEXT: CallExpr {{.*}} '<dependent type>'
Expand All @@ -29,16 +29,16 @@
// CHECK-NEXT: ParmVarDecl {{.*}} other 'const hlsl::ConstantBuffer<element_type> &'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: BinaryOperator {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' '='
// CHECK-NEXT: MemberExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' lvalue .__handle
// CHECK-NEXT: CXXThisExpr {{.*}} 'hlsl::ConstantBuffer<element_type>' lvalue implicit this
// CHECK-NEXT: MemberExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' lvalue .__handle
// CHECK-NEXT: DeclRefExpr {{.*}} 'const hlsl::ConstantBuffer<element_type>' lvalue ParmVar {{.*}} 'other' 'const hlsl::ConstantBuffer<element_type> &'
Expand All @@ -47,16 +47,16 @@
// CHECK-NEXT: ParmVarDecl {{.*}} other 'const hlsl::ConstantBuffer<element_type> &'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: BinaryOperator {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' '='
// CHECK-NEXT: MemberExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' lvalue .__handle
// CHECK-NEXT: CXXThisExpr {{.*}} 'hlsl::ConstantBuffer<element_type>' lvalue implicit this
// CHECK-NEXT: MemberExpr {{.*}} '__hlsl_resource_t
// CHECK-SAME{LITERAL}: [[hlsl::resource_class(CBuffer)]]
// CHECK-SAME{LITERAL}: [[hlsl::resource_class("CBuffer")]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
// CHECK-SAME: ' lvalue .__handle
// CHECK-NEXT: DeclRefExpr {{.*}} 'const hlsl::ConstantBuffer<element_type>' lvalue ParmVar {{.*}} 'other' 'const hlsl::ConstantBuffer<element_type> &'
Expand Down Expand Up @@ -159,6 +159,6 @@ float main() {
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'const hlsl::ConstantBuffer<Nested>' lvalue <NoOp>
// CHECK-NEXT: DeclRefExpr {{.*}} 'ConstantBuffer<Nested>':'hlsl::ConstantBuffer<Nested>' lvalue Var {{.*}} 'cb_nested' 'ConstantBuffer<Nested>':'hlsl::ConstantBuffer<Nested>'
float a = cb_nested.getA();

return f1 + f2 + f3 + a;
}
Loading
Loading