[clang] [LifetimeSafety] Add details for `-Wlifetime-safety-return-stack-addr` diagnostic (PR #199432)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Wed May 27 00:00:05 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/31906

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Sema/warn-lifetime-safety.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/23/include -nostdsysteminc -fsyntax-only -Wlifetime-safety -Wno-dangling -verify=expected,function /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp
# executed command: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/23/include -nostdsysteminc -fsyntax-only -Wlifetime-safety -Wno-dangling -verify=expected,function /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp
# .---command stderr------------
# | error: diagnostics with 'warning' severity expected but not seen: 
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3353 'expected-warning': address of stack memory is returned later
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3359 'expected-warning': address of stack memory is returned later
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3365 'expected-warning': address of stack memory is returned later
# | error: diagnostics with 'warning' severity seen but not expected: 
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3353: stack memory associated with local variable 'opt' is returned
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3359: stack memory associated with local variable 'opt' is returned
# |   File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/warn-lifetime-safety.cpp Line 3365: stack memory associated with local variable 'opt' is returned
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

--

********************


```

</details>

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


More information about the cfe-commits mailing list