[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 16 06:16:05 PDT 2025


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 c,cpp -- clang/test/Sema/implicit-int-conversion-on-int.c clang/lib/Sema/SemaChecking.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 203c9ad28..d7435fe8c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -12310,8 +12310,8 @@ void Sema::CheckImplicitConversion(Expr *E, QualType T, SourceLocation CC,
 
     if (const auto *UO = dyn_cast<UnaryOperator>(E)) {
       if (UO->getOpcode() == UO_Minus)
-        return DiagnoseImpCast(*this, E, T, CC,
-                               diag::warn_impcast_integer_precision_on_negation);
+        return DiagnoseImpCast(
+            *this, E, T, CC, diag::warn_impcast_integer_precision_on_negation);
     }
 
     if (TargetRange.Width == 32 && Context.getIntWidth(E->getType()) == 64)

``````````

</details>


https://github.com/llvm/llvm-project/pull/139429


More information about the cfe-commits mailing list