[clang] [clang-tools-extra] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 16 06:03:34 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang-tools-extra,clang` at step 7 "build-default".

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

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

```
Step 7 (build-default) failure: cmake (failure)
...
262.757 [227/52/5047] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSSet.cpp.o
262.894 [227/51/5048] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCRuntimeV1.cpp.o
262.900 [227/50/5049] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/CMakeFiles/lldbPluginGNUstepObjCRuntime.dir/GNUstepObjCRuntime.cpp.o
262.925 [227/49/5050] Building CXX object tools/lldb/source/Plugins/Language/CPlusPlus/CMakeFiles/lldbPluginCPlusPlusLanguage.dir/BlockPointer.cpp.o
262.984 [227/48/5051] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTImporter.cpp.o
263.230 [227/47/5052] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCDeclVendor.cpp.o
263.477 [227/46/5053] Building CXX object tools/lldb/source/Plugins/Platform/AIX/CMakeFiles/lldbPluginPlatformAIX.dir/PlatformAIX.cpp.o
263.602 [227/45/5054] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/CMakeFiles/lldbPluginObjCRuntime.dir/ObjCLanguageRuntime.cpp.o
263.606 [227/44/5055] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeFiles/lldbPluginCXXItaniumABI.dir/ItaniumABILanguageRuntime.cpp.o
263.650 [227/43/5056] 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 /usr/bin/c++ -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/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/include -I/usr/include/python3.12 -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source -D__OPTIMIZE__ -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-maybe-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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -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 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp: In member function ‘virtual void lldb_private::ClangExpressionParser::LLDBPreprocessorCallbacks::moduleImport(clang::SourceLocation, clang::ModuleIdPath, const clang::Module*)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:138:73: error: invalid initialization of reference of type ‘const std::pair<clang::IdentifierInfo*, clang::SourceLocation>&’ from expression of type ‘const llvm::ArrayRef<clang::IdentifierLoc>::value_type’ {aka ‘const clang::IdentifierLoc’}
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                                         ^~~~
263.895 [227/42/5057] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCRuntime.cpp.o
263.901 [227/41/5058] Linking CXX executable bin/llvm-cgdata
264.018 [227/40/5059] 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 /usr/bin/c++ -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/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/include -I/usr/include/python3.12 -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source -D__OPTIMIZE__ -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-maybe-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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -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 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: In member function ‘virtual bool {anonymous}::ClangModulesDeclVendorImpl::AddModule(const lldb_private::SourceModule&, lldb_private::ClangModulesDeclVendor::ModuleVector*, lldb_private::Stream&)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:65: error: cannot convert ‘std::pair<clang::IdentifierInfo*, clang::SourceLocation>’ to ‘clang::ModuleIdPath’ {aka ‘llvm::ArrayRef<clang::IdentifierLoc>’}
  360 |   clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
      |                                                 ~~~~~~~~~~~~~~~~^~
      |                                                                 |
      |                                                                 std::pair<clang::IdentifierInfo*, clang::SourceLocation>
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:112:59: note:   initializing argument 1 of ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’
  112 |   clang::ModuleLoadResult DoGetModule(clang::ModuleIdPath path,
      |                                       ~~~~~~~~~~~~~~~~~~~~^~~~
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:381:49: error: cannot convert ‘llvm::SmallVector<std::pair<clang::IdentifierInfo*, clang::SourceLocation>, 4>’ to ‘clang::ModuleIdPath’ {aka ‘llvm::ArrayRef<clang::IdentifierLoc>’}
  381 |   clang::Module *requested_module = DoGetModule(clang_path, true);
      |                                                 ^~~~~~~~~~
      |                                                 |
      |                                                 llvm::SmallVector<std::pair<clang::IdentifierInfo*, clang::SourceLocation>, 4>
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:112:59: note:   initializing argument 1 of ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’
  112 |   clang::ModuleLoadResult DoGetModule(clang::ModuleIdPath path,
      |                                       ~~~~~~~~~~~~~~~~~~~~^~~~
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: In member function ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:632:55: error: ‘const class clang::IdentifierLoc’ has no member named ‘second’
  632 |   return m_compiler_instance->loadModule(path.front().second, path, visibility,
      |                                                       ^~~~~~
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: At global scope:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:625:1: warning: ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’ defined but not used [-Wunused-function]
  625 | ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath path,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
264.211 [227/39/5060] Building CXX object tools/lldb/source/Plugins/Platform/FreeBSD/CMakeFiles/lldbPluginPlatformFreeBSD.dir/PlatformFreeBSD.cpp.o
264.391 [227/38/5061] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSDictionary.cpp.o
264.745 [227/37/5062] Linking CXX executable bin/bugpoint

```

</details>

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


More information about the cfe-commits mailing list