[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 22 03:50:35 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
0.491 [1/4/172] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundixf.S.o
0.494 [1/3/173] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/multf3.c.o
0.496 [1/2/174] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/trunctfxf2.c.o
0.569 [1/1/175] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/cpu_model/x86.c.o
0.584 [0/1/176] Linking C static library /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
70.880 [16/22/7237] Linking CXX executable bin/llvm-dwp
71.380 [15/21/7238] No install step for 'builtins'
71.390 [14/21/7240] Completed 'builtins'
71.423 [14/20/7241] Linking CXX executable bin/llvm-dwarfutil
71.656 [14/19/7242] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Tooling -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
71.877 [14/18/7243] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
72.199 [14/17/7244] Linking CXX executable bin/llvm-split
72.531 [14/16/7245] Linking CXX static library lib/libclangTidyCppCoreGuidelinesModule.a
73.965 [14/15/7246] Linking CXX executable bin/llvm-opt-fuzzer
80.360 [14/14/7247] Linking CXX executable tools/clang/tools/extra/unittests/clang-tidy/ClangTidyTests
82.432 [14/13/7248] Linking CXX executable unittests/CodeGen/CodeGenTests
84.169 [14/12/7249] Linking CXX executable bin/opt
84.306 [14/11/7250] Linking CXX executable bin/llvm-reduce
84.816 [14/10/7251] Linking CXX executable unittests/MI/MITests
85.252 [14/9/7252] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
85.922 [14/8/7253] Linking CXX executable unittests/MIR/MIRTests
85.953 [14/7/7254] Linking CXX executable unittests/Target/TargetMachineCTests
86.547 [14/6/7255] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
86.606 [14/5/7256] Linking CXX executable bin/llvm-lto2
86.936 [14/4/7257] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
87.519 [14/3/7258] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
87.521 [14/2/7259] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
89.029 [14/1/7260] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
ninja: build stopped: subcommand failed.

```

</details>

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


More information about the cfe-commits mailing list