[clang] [clang][constexpr] Fix assertion failure in C++26 constexpr structured binding pack evaluation (#170991) (PR #213534)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 25 04:51:59 PDT 2026


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 -- clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/cxx2c-decomposition.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/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index a8899a684..1f512664c 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -1690,7 +1690,8 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
       return;
 
     case IsTupleLike::TupleLike:
-      if (checkTupleLikeDecomposition(*this, Bindings, DD, DecompType, TupleSize))
+      if (checkTupleLikeDecomposition(*this, Bindings, DD, DecompType,
+                                      TupleSize))
         DD->setInvalidDecl();
       break;
 
@@ -1712,7 +1713,7 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
         DD->setInvalidDecl();
       break;
     }
-  }
+    }
   }
 
   CleanupVarDeclMarking();

``````````

</details>


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


More information about the cfe-commits mailing list