@@ -0,0 +1,76 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// This test validates the diagnostics that are emitted when a variable with a
"resource" type
+// is bound to a register using the register annotation
+
+// expe
@@ -459,7 +467,408 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -0,0 +1,71 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// This test validates the diagnostics that are emitted when a variable with a
"resource" type
+// is bound to a register using the register annotation
+
+/*
+tem
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD,
// the resource attr could be on the record decl itself or on one of
// its fields (the resource handle, most commonly)
-const auto *Attr = TheRecordDecl->getAttr();
+const auto *Attr = TheRec
@@ -0,0 +1,76 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// This test validates the diagnostics that are emitted when a variable with a
"resource" type
+// is bound to a register using the register annotation
+
+// expe
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/104239
>From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 14 Aug 2024 14:02:22 -0700
Subject: [PATCH 1/4] create texture dimension attr
---
clang/include/clang/Ba
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// previously, this test would result in an error shown below on the line that
+// declares variable a in struct Eg9:
+// error: use of undeclared identifier
+// 'SV_Dispat
@@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer(
else
DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation());
+ if (getLangOpts().HLSL)
bob80905 wrote:
I think the crucial difference between the two is that one overload i
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/3] parse hlsl annotations on struct, add test
---
clang/lib/
@@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer(
else
DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation());
+ if (getLangOpts().HLSL)
bob80905 wrote:
Though both would hit an assert if they're called outside of HLSL mod
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/4] parse hlsl annotations on struct, add test
---
clang/lib/
@@ -584,6 +585,39 @@ static Attr *handleOpenCLUnrollHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) OpenCLUnrollHintAttr(S.Context, A, UnrollFactor);
}
+static Attr *handleHLSLLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/5] parse hlsl annotations on struct, add test
---
clang/lib/
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// expected-no-diagnostics
+
+struct MyBitFields {
+unsigned int field1 : 3; // 3 bits for field1
+unsigned int field2 : 4; // 4 bits for field2
+int field3 : 5;
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// previously, this test would result in an error shown below on the line that
+// declares variable a in struct Eg9:
+// error: use of undeclared identifier
+// 'SV_Dispat
@@ -1,10 +1,13 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
-// TODO: update once we handle annotations on struct fields
+// tests that
@@ -1,10 +1,13 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
-// TODO: update once we handle annotations on struct fields
+// tests that
@@ -1,11 +1,24 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o
- %s | Filecheck %s
-// expected-no-diagnostics
struct MyBitFields {
-unsigned int field1
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/6] parse hlsl annotations on struct, add test
---
clang/lib/
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/7] parse hlsl annotations on struct, add test
---
clang/lib/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/87578
>From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 3 Apr 2024 13:15:59 -0700
Subject: [PATCH 01/15] implement binding type error for t/cbuffers and
rwbuffers
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/97103
There are currently no diagnostics being emitted for when a resource is bound
to a register with an incorrect binding type prefix. For example, a CBuffer
type resource should be bound with a a binding type pref
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bob80905 wrote:
This PR was based on code from April 3, and the branch is far too stale to
update at this point. I'm closing this, and have moved the implementation over
to this PR:
https://github.com/llvm/llvm-project/pull/97103
https://github.com/llvm/llvm-project/pull/87578
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/87578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/97103
>From c784272b3f66ca06be4ab8e72a0963e5ebb6a869 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 28 Jun 2024 12:40:56 -0700
Subject: [PATCH 1/2] update tests, update code
---
clang/include/clang/Basic/A
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/97103
>From c784272b3f66ca06be4ab8e72a0963e5ebb6a869 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 28 Jun 2024 12:40:56 -0700
Subject: [PATCH 1/3] update tests, update code
---
clang/include/clang/Basic/A
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -21,6 +21,7 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Sema/Scope.h"
+#include "clang/Sema/Sema.h"
bob80905 wrote:
Sema.h is needed because it defines `RequireCompleteType`
`RequireCompleteType` is re
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/106316
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/108292
In a previous PR, the `HLSLResourceClassAttr` attribute was removed from the
AST, in favor of using an attributed type that stores the same information
instead. This PR fixes test failures that assumed that `H
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/108292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/108128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106471
>From 7dfcf804ffcb850c7e3620866bc76f0971d82aaf Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 28 Aug 2024 16:35:36 -0700
Subject: [PATCH] add step
---
clang/include/clang/Basic/Builtins.td |
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106471
>From 7dfcf804ffcb850c7e3620866bc76f0971d82aaf Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 28 Aug 2024 16:35:36 -0700
Subject: [PATCH 1/2] add step
---
clang/include/clang/Basic/Builtins.td
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106471
>From 7dfcf804ffcb850c7e3620866bc76f0971d82aaf Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 28 Aug 2024 16:35:36 -0700
Subject: [PATCH 1/3] add step
---
clang/include/clang/Basic/Builtins.td
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/106471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -817,8 +821,12 @@ static void DiagnoseHLSLRegisterAttribute(Sema &S,
SourceLocation &ArgLoc,
S.Diag(TheDecl->getLocation(),
diag::warn_hlsl_user_defined_type_missing_member)
<< regTypeNum;
-
-return;
+// Space argument cannot be specifie
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/4] add diag and testing for space and global constants
---
@@ -1,5 +1,24 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/4] add diag and testing for space and global constants
---
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/5] add diag and testing for space and global constants
---
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/6] add diag and testing for space and global constants
---
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/7] add diag and testing for space and global constants
---
@@ -0,0 +1,66 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
bob80905 wrote:
I will at least say it's simpler for a distinct file to test this, since we
test multiple resource types (UDTs, basic, resources) w
@@ -12,7 +12,7 @@
// HALF: #define __HLSL_ENABLE_16_BIT 1
// NOHALF-NOT: __HLSL_ENABLE_16_BIT
-// CHECK: #define __HLSL_VERSION 2021
+// CHECK: #define __HLSL_VERSION 2028
bob80905 wrote:
I do not understand where this 2028 is coming from. Is 202x intended to
@@ -323,30 +324,99 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename */
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/14] ConceptSpecializationExpr shows up in AST!!!
---
.../c
@@ -483,10 +573,103 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S, RC);
}
+BinaryOperator *getSizeOfLEQ16Expr(clang::ASTContext &context,
+ SourceLocation NameLoc,
+
@@ -1,64 +1,64 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-DEMPTY %s | FileCheck -check-prefix=EMPTY %s
bob80905 wrote:
Fixed!
https://github.com/llvm/llvm-project/pull/112600
___
@@ -323,30 +324,119 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename *
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/112661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/112602
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/112602
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/10] ConceptSpecializationExpr shows up in AST!!!
---
.../c
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/11] ConceptSpecializationExpr shows up in AST!!!
---
.../c
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/112600
This PR is step one on the journey to implement resource element type
validation via C++20 concepts. The PR sets up the infrastructure for injecting
implicit concept decls / concept specialization expressions
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 1/7] ConceptSpecializationExpr shows up in AST!!!
---
.../cla
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/11] ConceptSpecializationExpr shows up in AST!!!
---
.../c
https://github.com/bob80905 ready_for_review
https://github.com/llvm/llvm-project/pull/112600
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 1/8] ConceptSpecializationExpr shows up in AST!!!
---
.../cla
@@ -155,3 +197,24 @@ int3 test_sign_int64_t3(int64_t3 p0) { return sign(p0); }
// CHECK: %hlsl.sign = call <4 x i32> @llvm.[[TARGET]].sign.v4i64(
// CHECK: ret <4 x i32> %hlsl.sign
int4 test_sign_int64_t4(int64_t4 p0) { return sign(p0); }
+
+
+// CHECK: define [[FNATTRS]] i32 @
@@ -323,30 +324,99 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename */
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/13] ConceptSpecializationExpr shows up in AST!!!
---
.../c
@@ -323,30 +324,99 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename */
@@ -1,64 +1,64 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-DEMPTY %s | FileCheck -check-prefix=EMPTY %s
bob80905 wrote:
Yes, line endings seem to be messed up. I've checked out main for both these
files and only changed the
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/112600
>From 0739f6da81d7c1edd9578ae4ff9dd699e5c828c6 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 10 Oct 2024 14:31:25 -0700
Subject: [PATCH 01/14] ConceptSpecializationExpr shows up in AST!!!
---
.../c
@@ -74,6 +75,42 @@ static Value *expandAbs(CallInst *Orig) {
"dx.max");
}
+static Value *expandCrossIntrinsic(CallInst *Orig) {
+
+ VectorType *VT = cast(Orig->getType());
+ if (cast(VT)->getNumElements() != 3)
+report_fatal_error(Twine("
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/109180
>From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 18 Sep 2024 12:20:19 -0700
Subject: [PATCH 1/8] add cross hlsl function
---
clang/include/clang/Basic/Bu
@@ -1135,21 +1147,19 @@ static void ValidateMultipleRegisterAnnotations(Sema
&S, Decl *TheDecl,
RegisterType otherRegType = getRegisterType(attr->getSlot());
if (RegisterTypesDetected[static_cast(otherRegType)]) {
-if (PreviousConflicts[TheDecl].count(othe
@@ -115,12 +114,14 @@ struct Eg13{
MySRV s1;
MySRV s2;
};
-// expected-warning@+4{{binding type 'u' only applies to types containing UAV
resources}}
// expected-warning@+3{{binding type 'u' only applies to types containing UAV
resources}}
-// expected-warning@+2{{binding
@@ -985,44 +983,43 @@ SemaHLSL::TakeLocForHLSLAttribute(const
HLSLAttributedResourceType *RT) {
return LocInfo;
}
-// get the record decl from a var decl that we expect
-// represents a resource
-static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) {
- const Type *T
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
@@ -4588,6 +4588,35 @@ def HLSLResourceBinding: InheritableAttr {
let LangOpts = [HLSL];
let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>];
let Documentation = [HLSLResourceBindingDocs];
+ let AdditionalMembers = [{
+ enum class RegisterType : unsigned
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/113730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/114852
Reverts https://github.com/llvm/llvm-project/pull/113730
>From a31199224c19c1087b114de29d864125b720e6d8 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 25 Oct 2024 12:33:05 -0700
Subject: [PATCH 1/7]
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/114864
This PR implements a new type trait as a builtin,
__builtin_hlsl_is_typed_resource_element_compatible
This type traits verifies that the given input type is suitable as a typed
resource element type.
It checks
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/114864
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/114853
Reverts llvm/llvm-project#113730
>From c110aaa2eb7862657df58c5f76e4231f27110450 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Mon, 4 Nov 2024 11:11:46 -0800
Subject: [PATCH] Revert "[HLSL] add IsTypedRes
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/114853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/114852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/114853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/115045
>From ef4a7eea3eacce4f77b628aebe7f2838733971d0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 5 Nov 2024 10:35:59 -0800
Subject: [PATCH 1/2] add empty struct test cases
---
.../SemaHLSL/Types/Traits
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/114864
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/115045
This PR adds empty struct cases to the test file for the builtin.
>From ef4a7eea3eacce4f77b628aebe7f2838733971d0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 5 Nov 2024 10:35:59 -0800
Subject: [PAT
@@ -2163,6 +2163,50 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
}
+bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
+ if (QT.isNull())
+return false;
+
+ // check if the outer type was an array type
+ if (QT->isArrayType())
+retur
301 - 400 of 563 matches
Mail list logo