[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-with-lto-ubuntu`
running on `as-worker-91` while building `clang` at step 6
"build-stage1-compiler".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/49/builds/1922
Here is the relevant piece of the build log for the reference
```
Step 6 (build-stage1-compiler) failure: build (failure)
...
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:319:8:
note: by ‘virtual bool
clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool,
bool)’
319 | bool visitInputFile(StringRef Filename, bool isSystem,
|^~
759.542 [1339/72/5222] Linking CXX executable bin/clang-import-test
760.230 [1338/72/5223] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
762.244 [1337/72/5224] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
763.290 [1336/72/5225] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Parse/ParseHLSLRootSignatureTest.cpp.o
763.376 [1335/72/5226] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
764.030 [1334/72/5227] Linking CXX executable bin/clang-installapi
764.420 [1333/72/5228] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0
-DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/tools/clang/unittests
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/tools/clang/include
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Tooling
-I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/third-party/unittest/googletest/include
-I/home/buildbot/as-worker-91/clang-with-lto-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 -Wctad-maybe-unsupported -fdiagnostics-color
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3
-DNDEBUG -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti
-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/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
765.833 [1333/71/5229] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/MacroExpansionContextTest.cpp.o
765.917 [1333/70/5230] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPCallbacksTest.cpp.o
766.300 [1333/69/5231] Building CXX object
tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Interpreter.cpp.o
766.632 [1333/68/5232] Building CXX object
tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/ClangScanDeps.cpp.o
In file included from
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencySca
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `clang`
at step 6 "build-stage1-compiler".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/127/builds/4165
Here is the relevant piece of the build log for the reference
```
Step 6 (build-stage1-compiler) failure: build (failure)
...
743.208 [1352/72/5209] Linking CXX shared module
lib/CheckerOptionHandlingAnalyzerPlugin.so
745.010 [1351/72/5210] Linking CXX executable bin/clang-refactor
745.136 [1350/72/5211] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPCallbacksTest.cpp.o
745.454 [1349/72/5212] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
745.740 [1348/72/5213] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Parse/ParseHLSLRootSignatureTest.cpp.o
745.898 [1347/72/5214] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
746.652 [1346/72/5215] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
747.406 [1345/72/5216] Linking CXX executable bin/clang-sycl-linker
747.924 [1344/72/5217] Linking CXX executable bin/clang-installapi
748.903 [1343/72/5218] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0
-DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/tools/clang/unittests
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/tools/clang/include
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/include
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Tooling
-I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/third-party/unittest/googletest/include
-I/home/buildbot/as-worker-92/clang-with-thin-lto-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 -Wctad-maybe-unsupported -fdiagnostics-color
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3
-DNDEBUG -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti
-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/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
750.284 [1343/71/5219] Building CXX object
tools/clang/tools/clang-repl/CMakeFiles/clang-repl.dir/ClangRepl.cpp.o
750.468 [1343/70/5220] Building CXX object
tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Interpreter.cpp.o
750.687 [1343/69/5221] Building CXX object
tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/ClangScanDeps.cpp.o
In file included from
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:19,
from
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/ll
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-lnt`
running on `systemz-1` while building `clang` at step 7 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/136/builds/4678
Here is the relevant piece of the build log for the reference
```
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[399/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DiagnosticTest.cpp.o
[400/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SanitizersTest.cpp.o
[401/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SarifTest.cpp.o
[402/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/LineOffsetMappingTest.cpp.o
[403/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/FileManagerTest.cpp.o
[404/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/OffloadArchTest.cpp.o
[405/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/CharInfoTest.cpp.o
[406/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DarwinSDKInfoTest.cpp.o
[407/1224] Building CXX object
tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SourceManagerTest.cpp.o
[408/1224] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros
/usr/bin/ccache /usr/bin/c++ -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/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/tools/clang/unittests
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/tools/clang/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/llvm/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Tooling
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/third-party/unittest/googletest/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/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 -Wctad-maybe-unsupported -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/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of 'std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes
meaning of 'TestAST' [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/include/clang/Testing/TestAST.h:72:7:
note: 'TestAST' declared here as 'class clang::TestAST'
72 | class TestAST {
| ^~~
[409/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/BracesInserterTest.cpp.o
[410/1224] Linking CXX executable tools/clang/unittests/Basic/BasicTests
[411/1224] Linking CXX executable
tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.
```
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running
on `systemz-1` while building `clang` at step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/42/builds/5461
Here is the relevant piece of the build log for the reference
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[417/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestJava.cpp.o
[418/1224] Linking CXX executable tools/clang/unittests/Basic/BasicTests
[419/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestMacroExpansion.cpp.o
[420/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestJson.cpp.o
[421/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestProto.cpp.o
[422/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestObjC.cpp.o
[423/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestRawStrings.cpp.o
[424/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestSelective.cpp.o
[425/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestTableGen.cpp.o
[426/1224] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros
/usr/bin/ccache /usr/bin/c++ -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/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/tools/clang/unittests
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/tools/clang/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/llvm/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Tooling
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/third-party/unittest/googletest/include
-I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/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 -Wctad-maybe-unsupported -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/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of 'std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes
meaning of 'TestAST' [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/include/clang/Testing/TestAST.h:72:7:
note: 'TestAST' declared here as 'class clang::TestAST'
72 | class TestAST {
| ^~~
[427/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestTextProto.cpp.o
[428/1224] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestVerilog.cpp.o
[429/1224] Linking CXX executable
tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.
```
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
usx95 wrote:
Should be fixed by changing the name of the field to `AST` instead of `TestAST`
```
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’
[-fpermissive]
std::unique_ptr TestAST;
^~~
In file included from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Testing/TestAST.h:72:7:
error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
class TestAST {
^~~
```
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
usx95 wrote: Reverted in 54b50681ca0fd1c0c6ddb059c88981a45e2f1b19 Will fix forward the build breakage! https://github.com/llvm/llvm-project/pull/149158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while
building `clang` at step 5 "build-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/202/builds/2425
Here is the relevant piece of the build log for the reference
```
Step 5 (build-unified-tree) failure: build (failure)
...
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15:
note: declared here
6957 | typedef void *CXRemapping;
| ^~~
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6969:70:
warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
6969 | CINDEX_DEPRECATED CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
| ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15:
note: declared here
6957 | typedef void *CXRemapping;
| ^~~
293.517 [1385/8/5882] 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_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/buildbot/buildbot-root/gcc-no-asserts/build/tools/clang/unittests
-I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests
-I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include
-I/home/buildbot/buildbot-root/gcc-no-asserts/build/tools/clang/include
-I/home/buildbot/buildbot-root/gcc-no-asserts/build/include
-I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/include
-I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling
-I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/third-party/unittest/googletest/include
-I/home/buildbot/buildbot-root/gcc-no-asserts/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
-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/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
293.621 [1385/7/5883] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp.o
In file included from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Frontend/ASTUnit.h:16,
from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Frontend/FrontendAction.h:23,
from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/TestVisitor.h:21,
from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/CRTPTestVisitor.h:17,
from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksCommon.h:9,
from
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp:9:
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6959:78:
warni
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test`
while building `clang` at step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/76/builds/11502
Here is the relevant piece of the build log for the reference
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[77/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[78/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating
POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating
POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[1179/1229] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
ccache /usr/lib64/ccache/c++ -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/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Tooling
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections
-fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17
-Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG
-Wno-suggest-override -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/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’
[-fpermissive]
std::unique_ptr TestAST;
^~~
In file included from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Testing/TestAST.h:72:7:
error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
class TestAST {
^~~
[1208/1229] Building CXX object
unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfUseTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:40,
from
/home/buildbots/llvm-ex
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while
building `clang` at step 6 "build-stage1-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/168/builds/14450
Here is the relevant piece of the build log for the reference
```
Step 6 (build-stage1-unified-tree) failure: build (failure)
...
156.023 [9/50/6575] Generating ../../bin/llvm-otool
156.439 [9/49/6576] Linking CXX executable
unittests/Passes/PassBuilderBindings/PassesBindingsTests
157.235 [9/48/6577] Linking CXX executable bin/llvm-profgen
157.324 [9/47/6578] Linking CXX executable unittests/MC/MCTests
157.340 [9/46/6579] Linking CXX executable bin/llvm-libtool-darwin
157.371 [9/45/6580] Linking CXX executable
unittests/tools/llvm-cfi-verify/CFIVerifyTests
157.892 [9/44/6581] Linking CXX executable bin/llvm-lipo
158.173 [9/43/6582] Linking CXX executable bin/llvm-jitlink
158.180 [9/42/6583] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/StandardLibraryTest.cpp.o
158.417 [9/41/6584] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
ccache /usr/lib64/ccache/c++ -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/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Tooling
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections
-fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17
-Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG
-Wno-suggest-override -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/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’
[-fpermissive]
std::unique_ptr TestAST;
^~~
In file included from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
class TestAST {
^~~
166.208 [9/40/6585] Linking CXX executable bin/llvm-opt-fuzzer
167.546 [9/39/6586] Linking CXX executable bin/clang-extdef-mapping
168.798 [9/38/6587] Linking CXX executable bin/clang-scan-deps
169.487 [9/37/6588] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
169.937 [9/36/658
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while
building `clang` at step 6 "test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/95/builds/16092
Here is the relevant piece of the build log for the reference
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
21.672 [5/4/77] Generating
POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
21.833 [5/3/78] Generating
ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
22.029 [4/3/79] Generating
POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
23.542 [4/2/80] Generating
ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
23.789 [2/3/81] Generating
POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
23.977 [2/2/82] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
27.583 [2/1/83] Generating
ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
27.829 [0/2/84] Generating
POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
28.017 [0/1/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
13.649 [7/47/1172] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
ccache /usr/lib64/ccache/c++ -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/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Tooling
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections
-fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17
-Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG
-Wno-suggest-override -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/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’
[-fpermissive]
std::unique_ptr TestAST;
^~~
In file included from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
class TestAST {
^~~
23.548 [7/15/1204] Building CXX object
unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfUseTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
from
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/c
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`llvm-clang-key-instructions` running on `sie-linux-worker5` while building
`clang` at step 5 "build-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/208/builds/2988
Here is the relevant piece of the build log for the reference
```
Step 5 (build-unified-tree) failure: build (failure)
...
178.175 [1386/10/5257] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/StandardLibraryTest.cpp.o
178.663 [1385/10/5258] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DiagnosticsYamlTest.cpp.o
178.721 [1384/10/5259] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/ExecutionTest.cpp.o
178.762 [1383/10/5260] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DependencyScanning/DependencyScanningFilesystemTest.cpp.o
178.803 [1382/10/5261] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/CompilationDatabaseTest.cpp.o
179.041 [1381/10/5262] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/QualTypeNamesTest.cpp.o
179.176 [1380/10/5263] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/HeaderAnalysisTest.cpp.o
179.212 [1379/10/5264] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp.o
179.234 [1378/10/5265] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/LookupTest.cpp.o
179.288 [1377/10/5266] 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-ki/build/tools/clang/unittests
-I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests
-I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include
-I/home/buildbot/buildbot-root/llvm-ki/build/tools/clang/include
-I/home/buildbot/buildbot-root/llvm-ki/build/include
-I/home/buildbot/buildbot-root/llvm-ki/llvm-project/llvm/include
-I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Tooling
-I/home/buildbot/buildbot-root/llvm-ki/llvm-project/third-party/unittest/googletest/include
-I/home/buildbot/buildbot-root/llvm-ki/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 -Wctad-maybe-unsupported -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-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
179.296 [1377/9/5267] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RangeSelectorTest.cpp.o
179.334 [1377/8/5268] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DependencyScanning/DependencyScannerTest.cpp.o
In file included from
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:19,
from
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Tooling/DependencyScannin
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross`
running on `suse-gary-m68k-cross` while building `clang` at step 5 "ninja check
1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/27/builds/13444
Here is the relevant piece of the build log for the reference
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
In file included from
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Parse/Parser.h:20,
from
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Lex/PPCallbacksTest.cpp:23:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7:
warning: ‘clang::Sema’ declared with greater visibility than the type of its
field ‘clang::Sema::UnusedFileScopedDecls’ [-Wattributes]
841 | class Sema final : public SemaBase {
| ^~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7:
warning: ‘clang::Sema’ declared with greater visibility than the type of its
field ‘clang::Sema::TentativeDefinitions’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7:
warning: ‘clang::Sema’ declared with greater visibility than the type of its
field ‘clang::Sema::ExtVectorDecls’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7:
warning: ‘clang::Sema’ declared with greater visibility than the type of its
field ‘clang::Sema::DelegatingCtorDecls’ [-Wattributes]
[186/1163] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
[187/1163] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
/usr/bin/c++ -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/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Tooling
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/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 -Wctad-maybe-unsupported -fdiagnostics-color
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3
-DNDEBUG -std=c++17 -Wno-variadic-macros -fno-exceptions -funwind-tables
-fno-rtti -UNDEBUG -Wno-suggest-override -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
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-Wchanges-meaning]
70 | std::unique_ptr TestAST;
|^~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:19:
note: used here to mean ‘class clang::TestAST’
70 | std::unique_ptr TestAST;
| ^~~
In file included from
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittest
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running
on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/18/builds/19360
Here is the relevant piece of the build log for the reference
```
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/4/12 ( of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/5/12 (3334 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/6/12 (3335 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/7/12 (3336 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/8/12 (3337 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/9/12 (3338 of 3342)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/0/2 (3339 of 3342)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/1/2 (3340 of 3342)
PASS: lldb-unit :: Process/gdb-remote/./ProcessGdbRemoteTests/8/35 (3341 of
3342)
TIMEOUT: lldb-api :: tools/lldb-dap/module/TestDAP_module.py (3342 of 3342)
TEST 'lldb-api :: tools/lldb-dap/module/TestDAP_module.py'
FAILED
Script:
--
/usr/bin/python3.10
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py
-u CXXFLAGS -u CFLAGS --env
LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env
LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env
LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch
armv8l --build-dir
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex
--lldb-module-cache-dir
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api
--clang-module-cache-dir
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api
--executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb
--compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang
--dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil
--make /usr/bin/gmake --llvm-tools-dir
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --cmake-build-type
Release
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/module
-p TestDAP_module.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds
Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision
688ea048affe8e79221ea1a8c376bcf20ef8f3bb)
clang revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb
llvm revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb
--
Command Output (stderr):
--
= DEBUG ADAPTER PROTOCOL LOGS =
1753182477.645302773 (stdio) -->
{"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1753182477.650547743 (stdio) <-- {"body":{"$__lldb_version":"lldb version
22.0.0git (https://github.com/llvm/llvm-project.git revision
688ea048affe8e79221ea1a8c376bcf20ef8f3bb)\n clang revision
688ea048affe8e79221ea1a8c376bcf20ef8f3bb\n llvm revision
688ea048affe8e79221ea1a8c376bcf20ef8f3bb","completionTriggerCharacters":[".","
","\t"],"exceptionBreakpointFilters":[{"description":"C++
Catch","filter":"cpp_catch","label":"C++
Catch","supportsCondition":true},{"description":"C++
Throw","filter":"cpp_throw","label":"C++
Throw","supportsCondition":true},{"description":"Objective-C
Catch","filter":"objc_catch","label":"Objective-C
Catch","supportsCondition":true},{"description":"Objective-C
Throw","filter":"objc_throw","label":"Objective-C
Throw","supportsCondition":true}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true,"supportsWriteMemoryRequest":true},"command":"initialize","request_seq":1,"seq":0,"s
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `arc-builder` running on
`arc-worker` while building `clang` at step 6
"test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/3/builds/19391
Here is the relevant piece of the build log for the reference
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
6957 | typedef void *CXRemapping;
| ^~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6969:70:
warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
6969 | CINDEX_DEPRECATED CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
| ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15:
note: declared here
6957 | typedef void *CXRemapping;
| ^~~
53.414 [914/18/75] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
57.559 [913/18/76] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
/usr/bin/c++ -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
-Itools/clang/unittests
-I/buildbot/worker/arc-folder/llvm-project/clang/unittests
-I/buildbot/worker/arc-folder/llvm-project/clang/include -Itools/clang/include
-Iinclude -I/buildbot/worker/arc-folder/llvm-project/llvm/include
-I/buildbot/worker/arc-folder/llvm-project/clang/unittests/Tooling
-I/buildbot/worker/arc-folder/llvm-project/third-party/unittest/googletest/include
-I/buildbot/worker/arc-folder/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
/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of 'std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes
meaning of 'TestAST' [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Testing/TestAST.h:72:7:
note: 'TestAST' declared here as 'class clang::TestAST'
72 | class TestAST {
| ^~~
57.903 [913/17/77] Building CXX object
tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/ConfigParseTest.cpp.o
58.415 [913/16/78] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
In file included from
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Frontend/ASTUnit.h:16,
from
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Frontend/FrontendAction.h:23,
from
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Tooling/Tooling.h:35,
from
/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/CloneDetectionTest.cpp:11:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6959:78:
warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
6959 | CINDEX_DEPRECATED CINDEX_LINKAGE CXRemapping clang_getRemappings(const
char *);
|
^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15:
note: declared here
6957 | typedef void *CXRemapping;
| ^~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6962:56:
warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
6962 | clang_getRemappingsFromFileLis
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building
`clang` at step 7 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/133/builds/19966
Here is the relevant piece of the build log for the reference
```
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[21/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/ModuleDeclStateTest.cpp.o
[22/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
[23/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/ArenaTest.cpp.o
[24/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPDependencyDirectivesTest.cpp.o
[25/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DataflowAnalysisContextTest.cpp.o
[26/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/LexerTest.cpp.o
[27/1009] Building CXX object
tools/clang/lib/Testing/CMakeFiles/clangTesting.dir/TestAST.cpp.o
[28/1009] Linking CXX static library lib/libclangTesting.a
[29/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/APSIntTypeTest.cpp.o
[30/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
/usr/bin/c++ -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/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/unittests
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/include
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/include
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Tooling
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googletest/include
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googlemock/include
-march=cascadelake -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
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections
-fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17
-Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG
-Wno-suggest-override -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
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
[31/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/DXCModeTest.cpp.o
[32/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ByteCode/BitcastBuffer.cpp.o
[33/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/CallEventTest.cpp.o
[34/1009] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cp
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building
`clang` at step 7 "Add check check-clang".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/10/builds/9921
Here is the relevant piece of the build log for the reference
```
Step 7 (Add check check-clang) failure: test (failure)
...
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Serialization/ASTReader.h:255:16:
warning: ‘virtual bool
clang::ASTReaderListener::visitInputFile(llvm::StringRef, llvm::StringRef,
bool, bool, bool)’ was hidden [-Woverloaded-virtual]
255 | virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef
Filename,
|^~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Serialization/ASTReader.h:319:8:
note: by ‘virtual bool
clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool,
bool)’
319 | bool visitInputFile(StringRef Filename, bool isSystem,
|^~
[291/296] Building CXX object
tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/CodeCompletionTest.cpp.o
[292/296] Building CXX object
tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/IncrementalProcessingTest.cpp.o
[293/296] Linking CXX executable
tools/clang/unittests/Interpreter/ClangReplInterpreterTests
[294/296] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED:
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
ccache /usr/bin/c++ -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/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/unittests
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/include
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/include
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Tooling
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/third-party/unittest/googletest/include
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/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 -Wctad-maybe-unsupported -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/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
ninja: build stopped: subcommand failed.
```
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`clang-x86_64-linux-abi-test` running on `sie-linux-worker2` while building
`clang` at step 6 "build-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/8/builds/18496
Here is the relevant piece of the build log for the reference
```
Step 6 (build-unified-tree) failure: build (failure)
...
255 | virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef
Filename,
|^~
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Serialization/ASTReader.h:319:8:
note: by ‘virtual bool
clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool,
bool)’
319 | bool visitInputFile(StringRef Filename, bool isSystem,
|^~
206.404 [1371/10/5894] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/BitfieldInitializer.cpp.o
206.778 [1370/10/5895] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Attr.cpp.o
206.836 [1369/10/5896] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp.o
206.838 [1368/10/5897] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksUnaryOperator.cpp.o
206.896 [1367/10/5898] 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/abi-test/build/tools/clang/unittests
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/include
-I/home/buildbot/buildbot-root/abi-test/build/tools/clang/include
-I/home/buildbot/buildbot-root/abi-test/build/include
-I/home/buildbot/buildbot-root/abi-test/llvm/llvm/include
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Tooling
-I/home/buildbot/buildbot-root/abi-test/llvm/third-party/unittest/googletest/include
-I/home/buildbot/buildbot-root/abi-test/llvm/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 -Wctad-maybe-unsupported -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/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28:
error: declaration of ‘std::unique_ptr
clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr TestAST;
|^~~
In file included from
/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Testing/TestAST.h:72:7:
note: ‘TestAST’ declared here as ‘class clang::TestAST’
72 | class TestAST {
| ^~~
206.923 [1367/9/5899] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksBinaryOperator.cpp.o
206.963 [1367/8/5900] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCompoundAssignOperator.cpp.o
206.986 [1367/7/5901] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Class.cpp.o
207.115 [1367/6/5902] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCallExpr.cpp.o
207.198 [1367/5/5903] Building CXX object
tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Concept.cpp.o
207.219 [1367/4/5904] Building
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
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
Here is the relevant piece of the build log for the reference
```
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::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes
meaning of ‘TestAST’ [-fpermissive]
70 | std::unique_ptr 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 unittes
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/149158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
usx95 wrote: ### Merge activity * **Jul 22, 10:30 AM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149158). https://github.com/llvm/llvm-project/pull/149158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/149158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/149158
>From 0311169154e4db2bb049168a1e73e3ae67d96848 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 16 Jul 2025 18:22:39 +
Subject: [PATCH] [LifetimeSafety] Revamp test suite using unittests
---
.../clang/Analysis/Analyses/LifetimeSafety.h | 78 +++-
clang/lib/Analysis/LifetimeSafety.cpp | 201 ++---
clang/lib/Sema/AnalysisBasedWarnings.cpp | 4 +-
clang/unittests/Analysis/CMakeLists.txt | 1 +
.../unittests/Analysis/LifetimeSafetyTest.cpp | 424 ++
5 files changed, 648 insertions(+), 60 deletions(-)
create mode 100644 clang/unittests/Analysis/LifetimeSafetyTest.cpp
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..ff71147a20f6c 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -17,14 +17,82 @@
//===--===//
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
-#include "clang/AST/DeclBase.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
- AnalysisDeclContext &AC);
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
-} // namespace clang
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template struct ID {
+ uint32_t Value = 0;
+
+ bool operator==(const ID &Other) const { return Value == Other.Value; }
+ bool operator!=(const ID &Other) const { return !(*this == Other); }
+ bool operator<(const ID &Other) const { return Value < Other.Value; }
+ ID operator++(int) {
+ID Tmp = *this;
+++Value;
+return Tmp;
+ }
+ void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+IDBuilder.AddInteger(Value);
+ }
+};
+
+using LoanID = ID;
+using OriginID = ID;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet;
+using OriginSet = llvm::ImmutableSet;
+
+using ProgramPoint = std::pair;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+ LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+ ~LifetimeSafetyAnalysis();
+
+ void run();
+
+ /// Returns the set of loans an origin holds at a specific program point.
+ LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+ /// Finds the OriginID for a given declaration.
+ /// Returns a null optional if not found.
+ std::optional getOriginIDForDecl(const ValueDecl *D) const;
+
+ /// Finds the LoanID for a loan created on a specific variable.
+ /// Returns a null optional if not found.
+ std::optional getLoanIDForVar(const VarDecl *VD) const;
+
+ llvm::StringMap getTestPoints() const;
+
+private:
+ AnalysisDeclContext &AC;
+ std::unique_ptr Factory;
+ std::unique_ptr FactMgr;
+ std::unique_ptr LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+
+} // namespace clang::lifetimes
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp
b/clang/lib/Analysis/LifetimeSafety.cpp
index e3a03cf93880e..50b47e1431723 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
#include "llvm/Support/TimeProfiler.h"
#include
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
namespace {
+template
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
+ return OS << ID.Value;
+}
+} // namespace
/// Represents the storage location being borrowed, e.g., a specific stack
/// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template struct ID {
- uint32_t Value = 0;
-
- bool operator==(const ID &Other) const { return Value == Other.Value; }
- bool operator!=(const ID &Other) const { return !(*this == Other); }
- bool operator<(const ID &Other) const { return Value < Other.Value; }
- ID operator++(int) {
-ID Tmp = *this;
-++Value;
-re
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp --
clang/unittests/Analysis/LifetimeSafetyTest.cpp
clang/include/clang/Analysis/Analyses/LifetimeSafety.h
clang/lib/Analysis/LifetimeSafety.cpp clang/lib/Sema/AnalysisBasedWarnings.cpp
``
View the diff from clang-format here.
``diff
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
index 739851dbd..7043c65eb 100644
--- a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -367,7 +367,7 @@ TEST_F(LifetimeAnalysisTest, LoopWithBreak) {
)");
EXPECT_THAT(Origin("p"), HasLoansTo({"s1"}, "before_loop"));
EXPECT_THAT(Origin("p"), HasLoansTo({"s2"}, "inside_if"));
-// At the join point after if, s2 cannot make it to p without the if.
+ // At the join point after if, s2 cannot make it to p without the if.
EXPECT_THAT(Origin("p"), HasLoansTo({"s1"}, "after_if"));
// At the join point after the loop, p could hold a loan to s1 (if the loop
// completed normally) or to s2 (if the loop was broken).
``
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/149158
>From 299ff3039df54ee9acc2a81a3204b43cad40f84e Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 16 Jul 2025 18:22:39 +
Subject: [PATCH] [LifetimeSafety] Revamp test suite using unittests
---
.../clang/Analysis/Analyses/LifetimeSafety.h | 78 +++-
clang/lib/Analysis/LifetimeSafety.cpp | 201 +---
clang/lib/Sema/AnalysisBasedWarnings.cpp | 4 +-
clang/unittests/Analysis/CMakeLists.txt | 1 +
.../unittests/Analysis/LifetimeSafetyTest.cpp | 428 ++
5 files changed, 652 insertions(+), 60 deletions(-)
create mode 100644 clang/unittests/Analysis/LifetimeSafetyTest.cpp
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..ff71147a20f6c 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -17,14 +17,82 @@
//===--===//
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
-#include "clang/AST/DeclBase.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
- AnalysisDeclContext &AC);
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
-} // namespace clang
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template struct ID {
+ uint32_t Value = 0;
+
+ bool operator==(const ID &Other) const { return Value == Other.Value; }
+ bool operator!=(const ID &Other) const { return !(*this == Other); }
+ bool operator<(const ID &Other) const { return Value < Other.Value; }
+ ID operator++(int) {
+ID Tmp = *this;
+++Value;
+return Tmp;
+ }
+ void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+IDBuilder.AddInteger(Value);
+ }
+};
+
+using LoanID = ID;
+using OriginID = ID;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet;
+using OriginSet = llvm::ImmutableSet;
+
+using ProgramPoint = std::pair;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+ LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+ ~LifetimeSafetyAnalysis();
+
+ void run();
+
+ /// Returns the set of loans an origin holds at a specific program point.
+ LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+ /// Finds the OriginID for a given declaration.
+ /// Returns a null optional if not found.
+ std::optional getOriginIDForDecl(const ValueDecl *D) const;
+
+ /// Finds the LoanID for a loan created on a specific variable.
+ /// Returns a null optional if not found.
+ std::optional getLoanIDForVar(const VarDecl *VD) const;
+
+ llvm::StringMap getTestPoints() const;
+
+private:
+ AnalysisDeclContext &AC;
+ std::unique_ptr Factory;
+ std::unique_ptr FactMgr;
+ std::unique_ptr LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+
+} // namespace clang::lifetimes
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp
b/clang/lib/Analysis/LifetimeSafety.cpp
index e3a03cf93880e..50b47e1431723 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
#include "llvm/Support/TimeProfiler.h"
#include
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
namespace {
+template
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
+ return OS << ID.Value;
+}
+} // namespace
/// Represents the storage location being borrowed, e.g., a specific stack
/// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template struct ID {
- uint32_t Value = 0;
-
- bool operator==(const ID &Other) const { return Value == Other.Value; }
- bool operator!=(const ID &Other) const { return !(*this == Other); }
- bool operator<(const ID &Other) const { return Value < Other.Value; }
- ID operator++(int) {
-ID Tmp = *this;
-++Value;
-ret
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/149158
>From e5fefc05dcef6fd80fb459cca0d68a4d14c66564 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 16 Jul 2025 18:22:39 +
Subject: [PATCH] [LifetimeSafety] Revamp test suite using unittests
---
.../clang/Analysis/Analyses/LifetimeSafety.h | 77 +-
clang/lib/Analysis/LifetimeSafety.cpp | 201 +++
clang/lib/Sema/AnalysisBasedWarnings.cpp | 4 +-
clang/unittests/Analysis/CMakeLists.txt | 1 +
.../unittests/Analysis/LifetimeSafetyTest.cpp | 231 ++
5 files changed, 455 insertions(+), 59 deletions(-)
create mode 100644 clang/unittests/Analysis/LifetimeSafetyTest.cpp
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..4d45284da646c 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -20,11 +20,80 @@
#include "clang/AST/DeclBase.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
- AnalysisDeclContext &AC);
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
-} // namespace clang
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template struct ID {
+ uint32_t Value = 0;
+
+ bool operator==(const ID &Other) const { return Value == Other.Value; }
+ bool operator!=(const ID &Other) const { return !(*this == Other); }
+ bool operator<(const ID &Other) const { return Value < Other.Value; }
+ ID operator++(int) {
+ID Tmp = *this;
+++Value;
+return Tmp;
+ }
+ void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+IDBuilder.AddInteger(Value);
+ }
+};
+
+using LoanID = ID;
+using OriginID = ID;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet;
+using OriginSet = llvm::ImmutableSet;
+
+using ProgramPoint = std::pair;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+ LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+ ~LifetimeSafetyAnalysis();
+
+ void run();
+
+ /// Returns the set of loans an origin holds at a specific program point.
+ LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+ /// Finds the OriginID for a given declaration.
+ /// Returns a null optional if not found.
+ std::optional getOriginIDForDecl(const ValueDecl *D) const;
+
+ /// Finds the LoanID for a loan created on a specific variable.
+ /// Returns a null optional if not found.
+ std::optional getLoanIDForVar(const VarDecl *VD) const;
+
+ llvm::StringMap getTestPoints() const;
+
+private:
+ AnalysisDeclContext &AC;
+ std::unique_ptr Factory;
+ std::unique_ptr FactMgr;
+ std::unique_ptr LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+
+} // namespace clang::lifetimes
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp
b/clang/lib/Analysis/LifetimeSafety.cpp
index e3a03cf93880e..50b47e1431723 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
#include "llvm/Support/TimeProfiler.h"
#include
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
namespace {
+template
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
+ return OS << ID.Value;
+}
+} // namespace
/// Represents the storage location being borrowed, e.g., a specific stack
/// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template struct ID {
- uint32_t Value = 0;
-
- bool operator==(const ID &Other) const { return Value == Other.Value; }
- bool operator!=(const ID &Other) const { return !(*this == Other); }
- bool operator<(const ID &Other) const { return Value < Other.Value; }
- ID operator++(int) {
-ID Tmp = *this;
-++Value;
-return Tmp;
- }
- void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
-IDBuilder.AddInteger(Value);
- }
-};
-
-template
-inline llvm::raw_ostream &operator<<(llvm::raw_ostream
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 updated
https://github.com/llvm/llvm-project/pull/149158
>From 2ff9adf18d58e16fdebb01fd830b0e7a920c58cb Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 16 Jul 2025 18:22:39 +
Subject: [PATCH] [LifetimeSafety] Revamp test suite using unittests
---
.../clang/Analysis/Analyses/LifetimeSafety.h | 77 ++-
clang/lib/Analysis/LifetimeSafety.cpp | 201 +-
clang/lib/Sema/AnalysisBasedWarnings.cpp | 4 +-
clang/unittests/Analysis/CMakeLists.txt | 1 +
.../unittests/Analysis/LifetimeSafetyTest.cpp | 191 +
5 files changed, 415 insertions(+), 59 deletions(-)
create mode 100644 clang/unittests/Analysis/LifetimeSafetyTest.cpp
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..4d45284da646c 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -20,11 +20,80 @@
#include "clang/AST/DeclBase.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
- AnalysisDeclContext &AC);
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
-} // namespace clang
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template struct ID {
+ uint32_t Value = 0;
+
+ bool operator==(const ID &Other) const { return Value == Other.Value; }
+ bool operator!=(const ID &Other) const { return !(*this == Other); }
+ bool operator<(const ID &Other) const { return Value < Other.Value; }
+ ID operator++(int) {
+ID Tmp = *this;
+++Value;
+return Tmp;
+ }
+ void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+IDBuilder.AddInteger(Value);
+ }
+};
+
+using LoanID = ID;
+using OriginID = ID;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet;
+using OriginSet = llvm::ImmutableSet;
+
+using ProgramPoint = std::pair;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+ LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+ ~LifetimeSafetyAnalysis();
+
+ void run();
+
+ /// Returns the set of loans an origin holds at a specific program point.
+ LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+ /// Finds the OriginID for a given declaration.
+ /// Returns a null optional if not found.
+ std::optional getOriginIDForDecl(const ValueDecl *D) const;
+
+ /// Finds the LoanID for a loan created on a specific variable.
+ /// Returns a null optional if not found.
+ std::optional getLoanIDForVar(const VarDecl *VD) const;
+
+ llvm::StringMap getTestPoints() const;
+
+private:
+ AnalysisDeclContext &AC;
+ std::unique_ptr Factory;
+ std::unique_ptr FactMgr;
+ std::unique_ptr LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+
+} // namespace clang::lifetimes
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp
b/clang/lib/Analysis/LifetimeSafety.cpp
index e3a03cf93880e..50b47e1431723 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
#include "llvm/Support/TimeProfiler.h"
#include
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
namespace {
+template
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
+ return OS << ID.Value;
+}
+} // namespace
/// Represents the storage location being borrowed, e.g., a specific stack
/// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template struct ID {
- uint32_t Value = 0;
-
- bool operator==(const ID &Other) const { return Value == Other.Value; }
- bool operator!=(const ID &Other) const { return !(*this == Other); }
- bool operator<(const ID &Other) const { return Value < Other.Value; }
- ID operator++(int) {
-ID Tmp = *this;
-++Value;
-return Tmp;
- }
- void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
-IDBuilder.AddInteger(Value);
- }
-};
-
-template
-inline llvm::raw_ostream &operator<<(llvm::raw_ostr
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
usx95 wrote: * **#149158** https://app.graphite.dev/github/pr/llvm/llvm-project/149158?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/149158?utm_source=stack-comment-view-in-graphite"; target="_blank">(View in Graphite) * `main` This stack of pull requests is managed by https://graphite.dev?utm-source=stack-comment";>Graphite. Learn more about https://stacking.dev/?utm_source=stack-comment";>stacking. https://github.com/llvm/llvm-project/pull/149158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
https://github.com/usx95 created
https://github.com/llvm/llvm-project/pull/149158
None
>From a208de6e71213a2114981fd74e66caad2ca02e78 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Wed, 16 Jul 2025 18:22:39 +
Subject: [PATCH] [LifetimeSafety] Revamp test suite using unittests
---
.../clang/Analysis/Analyses/LifetimeSafety.h | 74 ++-
clang/lib/Analysis/LifetimeSafety.cpp | 206 +-
clang/lib/Sema/AnalysisBasedWarnings.cpp | 4 +-
clang/unittests/Analysis/CMakeLists.txt | 1 +
.../unittests/Analysis/LifetimeSafetyTest.cpp | 191
5 files changed, 416 insertions(+), 60 deletions(-)
create mode 100644 clang/unittests/Analysis/LifetimeSafetyTest.cpp
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..4717afdf29885 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -20,11 +20,81 @@
#include "clang/AST/DeclBase.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
+
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template struct ID {
+ uint32_t Value = 0;
+
+ bool operator==(const ID &Other) const { return Value == Other.Value; }
+ bool operator!=(const ID &Other) const { return !(*this == Other); }
+ bool operator<(const ID &Other) const { return Value < Other.Value; }
+ ID operator++(int) {
+ID Tmp = *this;
+++Value;
+return Tmp;
+ }
+ void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+IDBuilder.AddInteger(Value);
+ }
+};
+
+using LoanID = ID;
+using OriginID = ID;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet;
+using OriginSet = llvm::ImmutableSet;
+
+using ProgramPoint = std::pair;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+ LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+ ~LifetimeSafetyAnalysis();
+
+ void run();
+
+ /// Returns the set of loans an origin holds at a specific program point.
+ LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+ /// Finds the OriginID for a given declaration.
+ /// Returns a null optional if not found.
+ std::optional getOriginIDForDecl(const ValueDecl *D) const;
+
+ /// Finds the LoanID for a loan created on a specific variable.
+ /// Returns a null optional if not found.
+ std::optional getLoanIDForVar(const VarDecl *VD) const;
+
+ llvm::StringMap getTestPoints() const;
+
+private:
+ AnalysisDeclContext &AC;
+ std::unique_ptr Factory;
+ std::unique_ptr FactMgr;
+ std::unique_ptr LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
AnalysisDeclContext &AC);
-} // namespace clang
+} // namespace clang::lifetimes
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp
b/clang/lib/Analysis/LifetimeSafety.cpp
index e3a03cf93880e..f28e6075ef4fc 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
#include "llvm/Support/TimeProfiler.h"
#include
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
namespace {
+template
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
+ return OS << ID.Value;
+}
+} // namespace
/// Represents the storage location being borrowed, e.g., a specific stack
/// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template struct ID {
- uint32_t Value = 0;
-
- bool operator==(const ID &Other) const { return Value == Other.Value; }
- bool operator!=(const ID &Other) const { return !(*this == Other); }
- bool operator<(const ID &Other) const { return Value < Other.Value; }
- ID operator++(int) {
-ID Tmp = *this;
-++Value;
-return Tmp;
- }
- void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
-IDBuilder.AddInteger(Value);
- }
-};
-
-template
-inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) {
- return OS << ID.Value;
-}
-
-usi
