[clang] Fix bug (PR #104811)

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 19 09:16:13 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 0ee0857363aadf9ce0f403e7e0da10f0a9d94887 fc81a200eac8e9e2da34e60d3de1c6bd61fc1c99 --extensions cpp -- clang/lib/Sema/SemaDecl.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 823292fe01..a3cc211a67 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13520,7 +13520,8 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
     Init = Result.getAs<Expr>();
 
     // Assert that Init is non-null only if no errors have occurred.
-    assert((!Result.isInvalid() && Init) && "Should have a valid initializer at this point");
+    assert((!Result.isInvalid() && Init) &&
+           "Should have a valid initializer at this point");
 
     IsParenListInit = !InitSeq.steps().empty() &&
                       InitSeq.step_begin()->Kind ==

``````````

</details>


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


More information about the cfe-commits mailing list