[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 16:22:53 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 319e11daee807981db61dad3da90d9bf36317e03 8e20fce2dbb0e88bc6c286815d36339f37d34d80 -- clang/include/clang/Sema/SemaHLSL.h clang/lib/Sema/HLSLExternalSemaSource.cpp clang/lib/Sema/SemaHLSL.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Sema/SemaHLSL.h b/clang/include/clang/Sema/SemaHLSL.h
index d3d36d04d1..4e2a932093 100644
--- a/clang/include/clang/Sema/SemaHLSL.h
+++ b/clang/include/clang/Sema/SemaHLSL.h
@@ -21,8 +21,8 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Sema/Scope.h"
-#include "clang/Sema/SemaBase.h"
#include "clang/Sema/Sema.h"
+#include "clang/Sema/SemaBase.h"
#include <initializer_list>
namespace clang {
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index d2b2f16323..8b6ecc6b7d 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -546,7 +546,7 @@ void traverseType(QualType T, register_binding_flags &r) {
case llvm::hlsl::ResourceClass::Sampler: {
r.sampler = true;
break;
- }
+ }
}
}
@@ -617,7 +617,7 @@ register_binding_flags HLSLFillRegisterBindingFlags(Sema &S, Decl *D) {
case llvm::hlsl::ResourceClass::Sampler: {
r.sampler = true;
break;
- }
+ }
}
} else {
if (SamplerUAVOrSRV->getType()->isBuiltinType())
@@ -653,11 +653,11 @@ static void DiagnoseHLSLResourceRegType(Sema &S, SourceLocation &ArgLoc,
// TODO: emit diagnostic code based on the flags set in f.
}
-
void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
- if (dyn_cast<VarDecl>(D)) {
- if (SemaRef.RequireCompleteType(D->getBeginLoc(), cast<ValueDecl>(D)->getType(),
- diag::err_incomplete_type))
+ if (dyn_cast<VarDecl>(D)) {
+ if (SemaRef.RequireCompleteType(D->getBeginLoc(),
+ cast<ValueDecl>(D)->getType(),
+ diag::err_incomplete_type))
return;
}
StringRef Space = "space0";
``````````
</details>
https://github.com/llvm/llvm-project/pull/97103
More information about the cfe-commits
mailing list