[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-04 Thread Helena Kotas via cfe-commits
hekota wrote: Thank you @kazutakahirata! I will remove the code; the consistency check is repeated later in a called function. https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I've fixed the warnings from this PR with b2dabd2b06cb0ca5ea534bafe33c5cff5521be18. Now, I'm not familiar with the code here, but is it still important to do the consistency check on these two variables if you don't use them in `DiagnoseHLSLRegisterAttribute` at all othe

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4830 Here is the relevant piece of the build log for

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clangd-ubuntu-tsan` running on `clangd-ubuntu-clang` while building `clang` at step 6 "test-build-clangd-clangd-index-server-clangd-indexer-check-clangd". Full details are available at: https://lab.llvm.org/buildbot/#/builder

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106657 >From 214f801923d654f5fcc96241840aa7742cd0e85b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 29 Aug 2024 20:32:02 -0700 Subject: [PATCH 1/2] Improve code that fills resource binding flags --- clang/lib

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Justin Bogner via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; hekota wrote: Yes, the indivi

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; damyanp wrote: Along with thi

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; damyanp wrote: What is this w

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Adjust register binding diagnostic flags code in a couple of ways: - Store the resource class in the Flags struct to avoid duplicated scanning for HLSLResourceClassAttribute - Avoid unnecessary indirection whe

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/106657 Adjust register binding diagnostic flags code in a couple of ways: - Store the resource class in the Flags struct to avoid duplicated scanning for HLSLResourceClassAttribute - Avoid unnecessary indirection when c