[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
Sun Apr 6 10:27:36 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building `clang-tools-extra,clang` at step 8 "test-build-unified-tree-check-clang-unit".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/20906
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 8 (test-build-unified-tree-check-clang-unit) failure: test (failure)
...
[27/324] Building RC object tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\C_\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\resources\windows_version_resource.rc.res
[28/324] Building CXX object tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\Z3CrosscheckOracleTest.cpp.obj
[29/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\ModuleCacheTest.cpp.obj
[30/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\GCCVersionTest.cpp.obj
[31/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\MultilibBuilderTest.cpp.obj
[32/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\MultilibTest.cpp.obj
[33/324] Building RC object tools\clang\unittests\ASTMatchers\CMakeFiles\ASTMatchersTests.dir\C_\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\resources\windows_version_resource.rc.res
[34/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\SanitizerArgsTest.cpp.obj
[35/324] Building RC object tools\clang\unittests\ASTMatchers\Dynamic\CMakeFiles\DynamicASTMatchersTests.dir\48b300c34a7217f4dd73b5241653d7e9\llvm-project\llvm\resources\windows_version_resource.rc.res
[36/324] Building CXX object tools\clang\unittests\Parse\CMakeFiles\ParseTests.dir\ParseHLSLRootSignatureTest.cpp.obj
FAILED: tools/clang/unittests/Parse/CMakeFiles/ParseTests.dir/ParseHLSLRootSignatureTest.cpp.obj
C:\ninja\ccache.exe C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /nologo /TP -DCLANG_BUILD_STATIC -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\tools\clang\unittests\Parse -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\unittests\Parse -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\tools\clang\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googletest\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD /EHs-c- /GR- -std:c++17 /showIncludes /Fotools\clang\unittests\Parse\CMakeFiles\ParseTests.dir\ParseHLSLRootSignatureTest.cpp.obj /Fdtools\clang\unittests\Parse\CMakeFiles\ParseTests.dir\ /FS -c C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\unittests\Parse\ParseHLSLRootSignatureTest.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): error C2665: 'clang::Preprocessor::Preprocessor': no overloaded function could convert all the argument types
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\include\clang/Lex/Preprocessor.h(1168): note: could be 'clang::Preprocessor::Preprocessor(const clang::PreprocessorOptions &,clang::DiagnosticsEngine &,const clang::LangOptions &,clang::SourceManager &,clang::HeaderSearch &,clang::ModuleLoader &,clang::IdentifierInfoLookup *,bool,clang::TranslationUnitKind)'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): note: 'clang::Preprocessor::Preprocessor(const clang::PreprocessorOptions &,clang::DiagnosticsEngine &,const clang::LangOptions &,clang::SourceManager &,clang::HeaderSearch &,clang::ModuleLoader &,clang::IdentifierInfoLookup *,bool,clang::TranslationUnitKind)': cannot convert argument 1 from '_Ty' to 'const clang::PreprocessorOptions &'
with
[
_Ty=std::shared_ptr<clang::PreprocessorOptions>
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): note: Reason: cannot convert from '_Ty' to 'const clang::PreprocessorOptions'
with
[
_Ty=std::shared_ptr<clang::PreprocessorOptions>
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): note: while trying to match the argument list '(_Ty, clang::DiagnosticsEngine, clang::LangOptions, clang::SourceManager, clang::HeaderSearch, clang::TrivialModuleLoader, _Ty, _Ty)'
with
[
_Ty=std::shared_ptr<clang::PreprocessorOptions>
]
and
[
_Ty=nullptr
]
and
[
_Ty=bool
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(3465): note: the template instantiation context (the oldest one first) is
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\unittests\Parse\ParseHLSLRootSignatureTest.cpp(87): note: see reference to function template instantiation 'std::unique_ptr<clang::Preprocessor,std::default_delete<clang::Preprocessor>> std::make_unique<clang::Preprocessor,std::shared_ptr<clang::PreprocessorOptions>,clang::DiagnosticsEngine&,clang::LangOptions&,clang::SourceManager&,clang::HeaderSearch&,clang::TrivialModuleLoader&,nullptr,bool,0>(std::shared_ptr<clang::PreprocessorOptions> &&,clang::DiagnosticsEngine &,clang::LangOptions &,clang::SourceManager &,clang::HeaderSearch &,clang::TrivialModuleLoader &,nullptr &&,bool &&)' being compiled
[37/324] Building CXX object tools\clang\unittests\Lex\CMakeFiles\LexTests.dir\PPMemoryAllocationsTest.cpp.obj
[38/324] Building CXX object tools\clang\unittests\Lex\CMakeFiles\LexTests.dir\ModuleDeclStateTest.cpp.obj
[39/324] Building CXX object tools\clang\unittests\Lex\CMakeFiles\LexTests.dir\PPConditionalDirectiveRecordTest.cpp.obj
[40/324] Building CXX object tools\clang\unittests\Basic\CMakeFiles\BasicTests.dir\SourceManagerTest.cpp.obj
[41/324] Building CXX object tools\clang\unittests\Lex\CMakeFiles\LexTests.dir\PPDependencyDirectivesTest.cpp.obj
[42/324] Building CXX object tools\clang\unittests\Lex\CMakeFiles\LexTests.dir\LexerTest.cpp.obj
[43/324] Building CXX object tools\clang\lib\Testing\CMakeFiles\clangTesting.dir\TestAST.cpp.obj
[44/324] Building CXX object tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\APSIntTypeTest.cpp.obj
[45/324] Building CXX object tools\clang\unittests\Driver\CMakeFiles\ClangDriverTests.dir\DXCModeTest.cpp.obj
```
</details>
https://github.com/llvm/llvm-project/pull/133467
More information about the cfe-commits
mailing list