[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 14:39:18 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 60fa2b0670b874b702ddb9f81d098af692ea6875 1e815bb2090f7747da027a04f69906063db7b02a -- clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 410e08ea58..a6f9a0941c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -11449,7 +11449,7 @@ TEST_F(FormatTest, UnderstandsNewAndDelete) {
                "void delete(link p);",
                "void new (link p);\n"
                "void delete (link p);");
-  
+
   verifyFormat("{ p->delete(); }\n"
                "{ p->new(); }",
                "{ p->delete (); }\n"

``````````

</details>


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


More information about the cfe-commits mailing list