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 HEAD~1 HEAD --extensions cpp -- 
clang/tools/clang-format/ClangFormat.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/tools/clang-format/ClangFormat.cpp 
b/clang/tools/clang-format/ClangFormat.cpp
index da3d7edf2..d7cc37e79 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -513,8 +513,10 @@ static bool format(StringRef FileName, bool 
ErrorOnIncompleteFormat = false) {
   Ranges = tooling::calculateRangesAfterReplacements(Replaces, Ranges);
   FormattingAttemptStatus Status;
   Replacements FormatChanges;
-  if (DisableFormat.getNumOccurrences() == 0 || !DisableFormat)
-    FormatChanges = reformat(*FormatStyle, *ChangedCode, Ranges, 
AssumedFileName, &Status);
+  if (DisableFormat.getNumOccurrences() == 0 || !DisableFormat) {
+    FormatChanges =
+        reformat(*FormatStyle, *ChangedCode, Ranges, AssumedFileName, &Status);
+  }
   Replaces = Replaces.merge(FormatChanges);
   if (DryRun) {
     return Replaces.size() > (IsJson ? 1u : 0u) &&

``````````

</details>


https://github.com/llvm/llvm-project/pull/137617
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to