[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101433 >From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 31 Jul 2024 17:01:56 -0700 Subject: [PATCH 1/3] add attrs to handle in record decl, add ast dump test to

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/101433 This PR attaches the resource attributes, `HLSLResourceAttr` and `HLSLResourceClassAttr`, to the handle contained within such resource classes like `RWBuffer`. CodeGen will now search for fields within HLSL

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/8] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/7] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/6] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/5] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(), ArrayRef{X, Y, S}, nullptr, "hlsl.lerp"); } + case Builtin::BI__builtin_hlsl_elementwise_length: {

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
@@ -1079,6 +1079,28 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_elementwise_length: { +if (SemaRef.checkArgCount(TheCall, 1)) + return true; +if

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(), ArrayRef{X, Y, S}, nullptr, "hlsl.lerp"); } + case Builtin::BI__builtin_hlsl_elementwise_length: {

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/4] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(), ArrayRef{X, Y, S}, nullptr, "hlsl.lerp"); } + case Builtin::BI__builtin_hlsl_elementwise_length: {

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
@@ -249,6 +249,7 @@ DWARF Support in Clang Floating Point Support in Clang --- +- Add ``__builtin_elementwise_length``builtin for floating point types only. bob80905 wrote: Ah, this was a habit that seems to no longer be

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101256 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 26 Jul 2024 15:41:01 -0700 Subject: [PATCH 1/2] first attempt --- clang/docs/LanguageExtensions.rst

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/101256 This PR adds the length intrinsic and an HLSL function that uses it. The SPIRV implementation is left for a future PR. Fixes #99134 >From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001 From:

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-18 Thread Joshua Batista via cfe-commits
bob80905 wrote: Just an FYI, the syntax for adding a resource_class attribute as currently implemented looks like this: `[[hlsl::resource_class(SRV)]]` In your description, you may want to update this and other similar attributes. https://github.com/llvm/llvm-project/pull/97362

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-16 Thread Joshua Batista via cfe-commits
@@ -459,7 +467,475 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr ) { D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc)); } -void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr ) { +struct RegisterBindingFlags { +

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-15 Thread Joshua Batista via cfe-commits
@@ -1,9 +1,10 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify -// expected-error@+1 {{invalid resource class specifier 'c' used; expected 'b', 's', 't', or 'u'}} -float a : register(c0, space1); +// valid, The register

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-12 Thread Joshua Batista via cfe-commits
@@ -1,9 +1,10 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify -// expected-error@+1 {{invalid resource class specifier 'c' used; expected 'b', 's', 't', or 'u'}} -float a : register(c0, space1); +// valid, The register

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-12 Thread Joshua Batista via 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

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-12 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/98419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-12 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/8] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -o - %s -verify + +// expected-error@+1{{'resource_class' attribute takes one argument}} +struct [[hlsl::resource_class()]] Eg1 { + int i; +}; + +Eg1 e1; + +// expected-error@+1{{invalid resource class

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
@@ -437,6 +437,33 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr ) { + if (!AL.isArgIdent(0)) { +Diag(AL.getLoc(), diag::err_attribute_argument_type) +

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
@@ -7,7 +7,7 @@ struct [[hlsl::resource_class()]] Eg1 { Eg1 e1; -// expected-error@+1{{invalid resource class 'gibberish' used; expected 'SRV', 'UAV', 'CBuffer', or 'Sampler'}} +// expected-warning@+1{{ResourceClass attribute argument not supported: gibberish}}

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/6] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/5] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s + + +// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} <> SRV +struct [[hlsl::resource_class(SRV)]] Eg1 { + int i; +}; + +Eg1 e1; + +// CHECK: -CXXRecordDecl

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/4] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-11 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/98419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/3] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/98419 >From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 10 Jul 2024 17:10:26 -0700 Subject: [PATCH 1/2] split out resource class data from resource attr, add

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/98419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/98419 The ability to spell out and specify the resource class is necessary for testing various resource behaviors. Though it is not intended for users to use this in customized HLSL source code, the ability to

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -635,46 +626,52 @@ RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema , Decl *D) { } else r.Other = true; } - } else { -llvm_unreachable("unknown decl type"); } return r; } +int getRegisterTypeIndex(StringRef Slot) { + switch (Slot[0])

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -12303,7 +12303,10 @@ def err_hlsl_missing_semantic_annotation : Error< def err_hlsl_init_priority_unsupported : Error< "initializer priorities are not supported in HLSL">; -def err_hlsl_unsupported_register_type : Error<"invalid resource class specifier '%0' used;

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -490,34 +490,36 @@ void HLSLExternalSemaSource::defineTrivialHLSLTypes() { } /// Set up common members and attributes for buffer types -static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema , - ResourceClass

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct RegisterBindingFlags { + bool Resource = false; + bool Udt = false; + bool Other = false; + bool Basic = false; + + bool Srv = false; + bool Uav =

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-09 Thread Joshua Batista via 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

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-09 Thread Joshua Batista via cfe-commits
bob80905 wrote: Closing this PR since https://github.com/llvm/llvm-project/pull/98099 resolves the issue and has already been merged. https://github.com/llvm/llvm-project/pull/97505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-09 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/97505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/9] if debug exists, go up an extra dir ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -470,13 +892,15 @@ void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr ) { // Validate. if (!Slot.empty()) { switch (Slot[0]) { +case 't': case 'u': case 'b': case 's': -case 't': +case 'c': +case 'i': break;

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via 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

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; bob80905 wrote: No, it isn't possible, because the tests in udt depend

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; bob80905 wrote: Yes, it is intentional. The commented-out examples

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -25,17 +25,15 @@ set(assets ) set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets") -set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc") set(out_files) function(copy_files_to_dst src_dir dst_dir file) set(src "${src_dir}/${file}") set(dst

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/8] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/7] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -44,7 +42,10 @@ foreach(f ${assets}) install(FILES ${asset_dir}/${f} DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc" COMPONENT clang-doc) - copy_files_to_dst(${asset_dir} ${resource_dir} ${f}) + foreach(config ${CMAKE_CONFIGURATION_TYPES})

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/6] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/97505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via 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 01/14] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-07 Thread Joshua Batista via 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 01/13] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-05 Thread Joshua Batista via 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 01/12] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-05 Thread Joshua Batista via 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 01/11] update tests, update code ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-03 Thread Joshua Batista via cfe-commits
bob80905 wrote: Updated the description. In my tests, there are at least 5 copies of this file in the overall build output directory: ``` //Debug/share/clang-doc //Release/share/clang-doc //MinSizeRel/share/clang-doc //RelWithDebInfo/share/clang-doc //share/clang-doc ``` Yes, one per

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-03 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/97505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-03 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/5] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-03 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/4] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-03 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/3] if debug exists, go up an extra dir ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-03 Thread Joshua Batista via 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 01/10] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-02 Thread Joshua Batista via 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/9] update tests, update code ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-02 Thread Joshua Batista via cfe-commits
bob80905 wrote: An important assumption I'm making here is that the Debug directory cannot exist without the Release directory. If this assumption doesn't hold, then this fix will fail if only the release directory exists and debug is missing. I believe by the nature of how the llvm project

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/2] if debug exists, go up an extra dir ---

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/97505 In `clang-tools-extra\clang-doc\tool\ClangDocMain.cpp`, there is a function, `getDefaultAssetFiles` that tries to find the location of `\share\clang-doc\index.js`, but fails. This is because there are

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-02 Thread Joshua Batista via 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/8] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-02 Thread Joshua Batista via 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/7] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-01 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-01 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-01 Thread Joshua Batista via cfe-commits
@@ -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: Yes, done https://github.com/llvm/llvm-project/pull/97103

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-01 Thread Joshua Batista via 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/4] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via cfe-commits
@@ -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

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via 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/3] update tests, update code ---

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via 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] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-06-28 Thread Joshua Batista via cfe-commits
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

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-06-28 Thread Joshua Batista via 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

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via 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

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-06-28 Thread Joshua Batista via 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

  1   2   3   >