[clang] [Clang] Do not try to diagnose parameter packs in invalid pack expressions (PR #89257)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 12:38:54 PDT 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 750de326ef0408df4a5f91773c355ded1a1b1b77 d0d2c7b9271258ce520fe892f8263edf73f0ebeb -- clang/lib/Sema/SemaTemplateVariadic.cpp clang/test/SemaCXX/cxx2c-pack-indexing.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp
index a937de5aa8..a4b681ae4f 100644
--- a/clang/lib/Sema/SemaTemplateVariadic.cpp
+++ b/clang/lib/Sema/SemaTemplateVariadic.cpp
@@ -1085,7 +1085,7 @@ ExprResult Sema::ActOnPackIndexingExpr(Scope *S, Expr *PackExpression,
                                        SourceLocation RSquareLoc) {
   bool isParameterPack = ::isParameterPack(PackExpression);
   if (!isParameterPack) {
-    if(!PackExpression->containsErrors()) {
+    if (!PackExpression->containsErrors()) {
       CorrectDelayedTyposInExpr(IndexExpr);
       Diag(PackExpression->getBeginLoc(), diag::err_expected_name_of_pack)
           << PackExpression;

``````````

</details>


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


More information about the cfe-commits mailing list