[llvm-branch-commits] [clang] [LifetimeSafety] Introduce a liveness-based lifetime policy (PR #159991)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 24 06:00:54 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD clang/test/Analysis/LifetimeSafety/benchmark.py
``````````
: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 darker here.
</summary>
``````````diff
--- benchmark.py 2025-09-24 12:58:02.000000 +0000
+++ benchmark.py 2025-09-24 13:00:23.071600 +0000
@@ -195,11 +195,10 @@
# Use volatile to prevent optimization from removing the pointers
# We create a volatile pointer to each pointer.
for i in range(1, n + 1):
cpp_code += f" MyObj* volatile* vp{i} = &p{i};\n"
cpp_code += "\n"
-
cpp_code += f" switch (condition % {n}) {{\n"
for case_num in range(n):
cpp_code += f" case {case_num}:\n"
# This is a read-use of p{case_num + 1}
``````````
</details>
https://github.com/llvm/llvm-project/pull/159991
More information about the llvm-branch-commits
mailing list