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 origin/main HEAD --extensions cpp,h -- 
clang-tools-extra/clangd/Hover.cpp 
clang-tools-extra/clangd/unittests/HoverTests.cpp 
clang/include/clang/Sema/SemaHLSL.h clang/lib/Parse/ParseHLSL.cpp 
clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaHLSL.cpp 
--diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 4deb8fa93..f083d6975 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -875,7 +875,7 @@ static std::optional<uint32_t> getSemanticIndexOf(const 
Attr *A) {
     return PA->getSemanticIndex();
   if (const auto *UA = dyn_cast<HLSLUnparsedSemanticAttr>(A))
     return UA->getExplicitIndex() ? std::optional<uint32_t>(UA->getIndex())
-                                   : std::nullopt;
+                                  : std::nullopt;
   return std::nullopt;
 }
 
@@ -2036,11 +2036,11 @@ void SemaHLSL::handleSemanticAttr(Decl *D, const 
ParsedAttr &AL) {
   std::optional<unsigned> Index =
       ExplicitIndex ? std::optional<unsigned>(IndexValue) : std::nullopt;
   if (AL.getKind() == ParsedAttr::AT_HLSLParsedSemantic ||
-    AL.getAttrName()->getName().starts_with_insensitive("SV_")) {
+      AL.getAttrName()->getName().starts_with_insensitive("SV_")) {
     diagnoseSystemSemanticAttr(D, AL, Index);
   } else {
-    D->addAttr(HLSLUnparsedSemanticAttr::Create(
-        SemaRef.getASTContext(), IndexValue, ExplicitIndex, AL));
+    D->addAttr(HLSLUnparsedSemanticAttr::Create(SemaRef.getASTContext(),
+                                                IndexValue, ExplicitIndex, 
AL));
   }
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/217725
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to