[llvm-branch-commits] [clang] [analyzer] Only underline the exact parameter that is bound to the return value in UseAfterLifetimeEnd (PR #215651)
Benedek Kaibas via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 13 08:47:43 PDT 2026
benedekaibas wrote:
> Would be nice to have more tests, the one I was thinking of:
>
> ```
> int multi_params_annotated(int *p_one [[clang::lifetimebound]], int *p_two [[clang::lifetimebound]]);
> int global;
> int test_multi_param_highlight() {
> int local_two = 2;
> return multi_params_annotated(&global, &local_two);
> ```
>
> This would verify that the first argument would not get highlighted, even though it is actually lifetimebound.
I have added the test case here: [6704b10](https://github.com/llvm/llvm-project/pull/215651/commits/6704b104ce612a2afd23463ed79b873cddbc4618)
https://github.com/llvm/llvm-project/pull/215651
More information about the llvm-branch-commits
mailing list