[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 03:36:30 PST 2024


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 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
84.693 [142/31/6875] Linking CXX static library lib/libclangDoc.a
84.739 [141/31/6876] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/YAMLSerialization.cpp.o
84.945 [141/30/6877] Linking CXX executable bin/clang-doc
85.141 [141/29/6878] Building CXX object tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/clangd-fuzzer.cpp.o
85.416 [141/28/6879] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/StdLib.cpp.o
85.420 [141/27/6880] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/Serialization.cpp.o
86.351 [141/26/6881] Building CXX object tools/lldb/tools/lldb-instr/CMakeFiles/lldb-instr.dir/Instrument.cpp.o
86.372 [140/26/6882] Building CXX object tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o
86.528 [140/25/6883] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/TUScheduler.cpp.o
86.547 [140/24/6884] Building CXX object tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectTarget.cpp.o
FAILED: tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectTarget.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -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/lldb/source/Commands -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Commands -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/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/llvm/../clang/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/../clang/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/source -isystem /usr/include/libxml2 -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectTarget.cpp.o -MF tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectTarget.cpp.o.d -o tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectTarget.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp:2203:14: error: no matching member function for call to 'createDiagnostics'
    compiler.createDiagnostics();
    ~~~~~~~~~^~~~~~~~~~~~~~~~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/../clang/include/clang/Frontend/CompilerInstance.h:687:8: note: candidate function not viable: requires at least argument 'VFS', but no arguments were provided
  void createDiagnostics(llvm::vfs::FileSystem &VFS,
       ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/../clang/include/clang/Frontend/CompilerInstance.h:710:3: note: candidate function not viable: requires at least 2 arguments, but 0 were provided
  createDiagnostics(llvm::vfs::FileSystem &VFS, DiagnosticOptions *Opts,
  ^
1 error generated.
86.551 [140/23/6885] Building CXX object tools/clang/tools/extra/clangd/indexer/CMakeFiles/clangd-indexer.dir/IndexerMain.cpp.o
86.649 [140/22/6886] Linking CXX executable bin/lldb-instr
87.382 [140/21/6887] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/Background.cpp.o
87.967 [140/20/6888] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/SymbolCollector.cpp.o
88.821 [140/19/6889] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/refactor/Rename.cpp.o
89.510 [140/18/6890] Building CXX object tools/clang/tools/extra/clang-tidy/utils/CMakeFiles/obj.clangTidyUtils.dir/RenamerClangTidyCheck.cpp.o
90.461 [140/17/6891] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangFunctionCaller.cpp.o
91.137 [140/16/6892] Building CXX object tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/DeprecatedHeadersCheck.cpp.o
91.216 [140/15/6893] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/FileIndex.cpp.o
91.922 [140/14/6894] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Preamble.cpp.o
92.490 [140/13/6895] Building CXX object tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/PassByValueCheck.cpp.o
92.792 [140/12/6896] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.o
FAILED: tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -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/lldb/source/Plugins/ExpressionParser/Clang -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/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/llvm/../clang/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/../clang/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/source -isystem /usr/include/libxml2 -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.o -MF tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.o.d -o tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:709:7: error: no matching function for call to 'createDiagnostics'
      clang::CompilerInstance::createDiagnostics(diag_options_up.release(),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/../clang/include/clang/Frontend/CompilerInstance.h:687:8: note: candidate function not viable: no known conversion from 'std::unique_ptr<clang::DiagnosticOptions, std::default_delete<clang::DiagnosticOptions>>::pointer' (aka 'clang::DiagnosticOptions *') to 'llvm::vfs::FileSystem &' for 1st argument
  void createDiagnostics(llvm::vfs::FileSystem &VFS,
       ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/../clang/include/clang/Frontend/CompilerInstance.h:710:3: note: candidate function not viable: no known conversion from 'std::unique_ptr<clang::DiagnosticOptions, std::default_delete<clang::DiagnosticOptions>>::pointer' (aka 'clang::DiagnosticOptions *') to 'llvm::vfs::FileSystem &' for 1st argument
  createDiagnostics(llvm::vfs::FileSystem &VFS, DiagnosticOptions *Opts,
  ^
1 error generated.
94.195 [140/11/6897] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.o
FAILED: tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -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/lldb/source/Plugins/ExpressionParser/Clang -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/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/llvm/../clang/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/../clang/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source -I/b/1/llvm-x86_64-debian-dylib/build/tools/lldb/source -isystem /usr/include/libxml2 -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.o -MF tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.o.d -o tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

```

</details>

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


More information about the cfe-commits mailing list