[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)
LLVM Continuous Integration via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 4 11:26:30 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang-tools-extra,clang` at step 6 "test-build-unified-tree-check-clang".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/23911
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 6 (test-build-unified-tree-check-clang) failure: test (failure)
...
1.463 [184/98/34] Linking CXX static library lib/libllvm_gtest.a
1.472 [183/98/35] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTVectorTest.cpp.o
1.488 [182/98/36] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/CommentLexer.cpp.o
1.496 [181/98/37] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/CommentParser.cpp.o
1.516 [180/98/38] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/CommentTextTest.cpp.o
1.539 [179/98/39] Linking CXX static library lib/libLLVMTestingSupport.a
1.552 [178/98/40] Linking CXX static library lib/libllvm_gtest_main.a
1.623 [177/98/41] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/UnresolvedSetTest.cpp.o
1.632 [176/98/42] Building CXX object tools/clang/unittests/AST/ByteCode/CMakeFiles/InterpTests.dir/BitcastBuffer.cpp.o
15.266 [175/98/43] Building CXX object tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.o
FAILED: tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/tools/clang/unittests/Parse -I/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/unittests/Parse -I/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/clang/include -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googlemock/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.o -MF tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.o.d -o tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp:9:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include/clang/Basic/Diagnostic.h:17:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:18:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include/clang/Basic/LLVM.h:21:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Support/Casting.h:20:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/memory:83:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/unique_ptr.h:962:34: error: no matching constructor for initialization of 'clang::Preprocessor'
{ return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp:87:45: note: in instantiation of function template specialization 'std::make_unique<clang::Preprocessor, std::shared_ptr<clang::PreprocessorOptions>, clang::DiagnosticsEngine &, clang::LangOptions &, clang::SourceManager &, clang::HeaderSearch &, clang::TrivialModuleLoader &, nullptr_t, bool>' requested here
std::unique_ptr<Preprocessor> PP = std::make_unique<Preprocessor>(
^
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include/clang/Lex/Preprocessor.h:1168:3: note: candidate constructor not viable: no known conversion from 'std::shared_ptr<clang::PreprocessorOptions>' to 'const clang::PreprocessorOptions' for 1st argument
Preprocessor(const PreprocessorOptions &PPOpts, DiagnosticsEngine &diags,
^
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include/clang/Lex/Preprocessor.h:138:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 8 were provided
class Preprocessor {
^
1 error generated.
17.594 [175/97/44] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/PPMemoryAllocationsTest.cpp.o
18.540 [175/96/45] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/PPConditionalDirectiveRecordTest.cpp.o
19.289 [175/95/46] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/ModuleDeclStateTest.cpp.o
21.167 [175/94/47] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/PPDependencyDirectivesTest.cpp.o
23.410 [175/93/48] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SourceManagerTest.cpp.o
28.461 [175/92/49] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/LexerTest.cpp.o
30.178 [175/91/50] Building CXX object tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/DXCModeTest.cpp.o
32.255 [175/90/51] Building CXX object tools/clang/lib/Testing/CMakeFiles/clangTesting.dir/TestAST.cpp.o
32.708 [175/89/52] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/APSIntTypeTest.cpp.o
33.172 [175/88/53] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/EvaluateAsRValueTest.cpp.o
33.494 [175/87/54] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/SizelessTypesTest.cpp.o
33.556 [175/86/55] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ExternalASTSourceTest.cpp.o
33.733 [175/85/56] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/CloneDetectionTest.cpp.o
35.666 [175/84/57] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/RawCommentForDeclTest.cpp.o
35.960 [175/83/58] Building CXX object tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/ToolChainTest.cpp.o
37.429 [175/82/59] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/ObjcBug-124477.cpp.o
37.606 [175/81/60] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/MacroExpansionContextTest.cpp.o
37.892 [175/80/61] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/SValSimplifyerTest.cpp.o
```
</details>
https://github.com/llvm/llvm-project/pull/133467
More information about the cfe-commits
mailing list