[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 31 10:26:20 PDT 2023
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 483e92468e597b73c646182bd755a0d5ef67d327 fcbcac28116562e181ece169840e7cce50be6cdf -- clang-tools-extra/modularize/ModularizeUtilities.cpp clang/include/clang/AST/Attr.h clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/Sema/HLSLExternalSemaSource.cpp clang/unittests/Sema/SemaNoloadLookupTest.cpp clang/utils/TableGen/ClangAttrEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/HLSLExternalSemaSource.cpp b/clang/lib/Sema/HLSLExternalSemaSource.cpp
index 7e6c07b37..0be76d4b3 100644
--- a/clang/lib/Sema/HLSLExternalSemaSource.cpp
+++ b/clang/lib/Sema/HLSLExternalSemaSource.cpp
@@ -502,7 +502,6 @@ void HLSLExternalSemaSource::completeBufferType(CXXRecordDecl *Record) {
.addHandleMember()
.addDefaultHandleConstructor(*SemaPtr, ResourceClass::UAV)
.addArraySubscriptOperators()
- .annotateResourceClass(ResourceClass::UAV,
- ResourceKind::TypedBuffer)
+ .annotateResourceClass(ResourceClass::UAV, ResourceKind::TypedBuffer)
.completeDefinition();
}
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 1032028fd..fa5d95a07 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -960,8 +960,8 @@ namespace {
}
void writePCHReadDecls(raw_ostream &OS) const override {
- OS << " " << fullType << " " << getLowerName()
- << "(static_cast<" << fullType << ">(Record.readInt()));\n";
+ OS << " " << fullType << " " << getLowerName() << "(static_cast<"
+ << fullType << ">(Record.readInt()));\n";
}
void writePCHReadArgs(raw_ostream &OS) const override {
@@ -1028,8 +1028,8 @@ namespace {
SmallDenseSet<StringRef, 8> Uniques;
for (size_t I = 0; I < enums.size(); ++I) {
if (Uniques.insert(enums[I]).second)
- OS << " case " << fullType << "::" << enums[I]
- << ": return \"" << values[I] << "\";\n";
+ OS << " case " << fullType << "::" << enums[I] << ": return \""
+ << values[I] << "\";\n";
}
if (isExternal) {
OS << " default: llvm_unreachable(\"Invalid attribute value\");\n";
``````````
</details>
https://github.com/llvm/llvm-project/pull/70835
More information about the cfe-commits
mailing list