[clang] [Clang][Sema] Fix out-of-bounds access (PR #80978)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 03:53:49 PST 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 390b99743bdd60649414fe470d7a9bacc9992231 9c32a0ad9b85328b34545c8ec3a47611ecb4cd72 -- clang/lib/Sema/SemaOverload.cpp clang/test/SemaCXX/cxx2b-deducing-this.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index fc3d7d8dcf..ebbbdac631 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -7719,8 +7719,8 @@ bool Sema::CheckNonDependentConversions(
   unsigned Offset =
       Method && Method->hasCXXExplicitFunctionObjectParameter() ? 1 : 0;
 
-  for (unsigned I = 0, N = std::min(ParamTypes.size() - Offset, Args.size()); I != N;
-       ++I) {
+  for (unsigned I = 0, N = std::min(ParamTypes.size() - Offset, Args.size());
+       I != N; ++I) {
     QualType ParamType = ParamTypes[I + Offset];
     if (!ParamType->isDependentType()) {
       unsigned ConvIdx;

``````````

</details>


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


More information about the cfe-commits mailing list