Skip to content

[clang] Unify SourceLocation and IdentifierInfo* pair-like data structures to IdentifierLoc #135808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2025

Conversation

yronglin
Copy link
Contributor

@yronglin yronglin commented Apr 15, 2025

I found this issue when I working on #107168.

Currently we have many similiar data structures like:

  • std::pair<IdentifierInfo *, SourceLocation>.
  • Element type of ModuleIdPath.
  • IdentifierLocPair.
  • IdentifierLoc.

This PR unify these data structures to IdentifierLoc, moved IdentifierLoc definition to SourceLocation.h, and deleted other similer data structures.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:ARM backend:AArch64 clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules HLSL HLSL Language Support labels Apr 15, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 15, 2025

@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-hlsl
@llvm/pr-subscribers-backend-arm
@llvm/pr-subscribers-backend-aarch64
@llvm/pr-subscribers-clang-modules

@llvm/pr-subscribers-clang

Author: None (yronglin)

Changes

Currently we have many similiar data structures like:

  • std::pair&lt;IdentifierInfo *, SourceLocation&gt;.
  • Element type of ModuleIdPath.
  • IdentifierLocPair.
  • IdentifierLoc.

This PR unify these data structures to IdentifierLoc. I found this issue when I working on #107168.


Patch is 105.19 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/135808.diff

44 Files Affected:

  • (modified) clang/include/clang/AST/OpenACCClause.h (+2-2)
  • (modified) clang/include/clang/Basic/IdentifierTable.h (-3)
  • (modified) clang/include/clang/Basic/SourceLocation.h (+24)
  • (modified) clang/include/clang/Lex/ModuleLoader.h (+1-1)
  • (modified) clang/include/clang/Lex/Preprocessor.h (+4-5)
  • (modified) clang/include/clang/Parse/LoopHint.h (-1)
  • (modified) clang/include/clang/Parse/Parser.h (+5-8)
  • (modified) clang/include/clang/Sema/ParsedAttr.h (-10)
  • (modified) clang/include/clang/Sema/Sema.h (+1-1)
  • (modified) clang/include/clang/Sema/SemaCodeCompletion.h (+1-2)
  • (modified) clang/include/clang/Sema/SemaObjC.h (+2-2)
  • (modified) clang/include/clang/Sema/SemaOpenACC.h (+1-1)
  • (modified) clang/lib/AST/OpenACCClause.cpp (+2-2)
  • (modified) clang/lib/AST/TextNodeDumper.cpp (+2-2)
  • (modified) clang/lib/Frontend/CompilerInstance.cpp (+28-25)
  • (modified) clang/lib/Frontend/FrontendActions.cpp (+2-2)
  • (modified) clang/lib/Lex/PPDirectives.cpp (+11-11)
  • (modified) clang/lib/Lex/PPLexerChange.cpp (+3-3)
  • (modified) clang/lib/Lex/Pragma.cpp (+35-38)
  • (modified) clang/lib/Lex/Preprocessor.cpp (+8-8)
  • (modified) clang/lib/Parse/ParseDecl.cpp (+14-14)
  • (modified) clang/lib/Parse/ParseExpr.cpp (+4-3)
  • (modified) clang/lib/Parse/ParseHLSL.cpp (+1-1)
  • (modified) clang/lib/Parse/ParseObjc.cpp (+18-20)
  • (modified) clang/lib/Parse/ParseOpenACC.cpp (+7-5)
  • (modified) clang/lib/Parse/ParsePragma.cpp (+7-8)
  • (modified) clang/lib/Parse/ParseStmt.cpp (+3-3)
  • (modified) clang/lib/Parse/Parser.cpp (+9-10)
  • (modified) clang/lib/Sema/ParsedAttr.cpp (-8)
  • (modified) clang/lib/Sema/SemaARM.cpp (+1-1)
  • (modified) clang/lib/Sema/SemaCodeComplete.cpp (+4-4)
  • (modified) clang/lib/Sema/SemaDeclAttr.cpp (+65-59)
  • (modified) clang/lib/Sema/SemaDeclObjC.cpp (+19-16)
  • (modified) clang/lib/Sema/SemaHLSL.cpp (+6-6)
  • (modified) clang/lib/Sema/SemaModule.cpp (+23-19)
  • (modified) clang/lib/Sema/SemaObjC.cpp (+23-22)
  • (modified) clang/lib/Sema/SemaOpenACCClause.cpp (+6-5)
  • (modified) clang/lib/Sema/SemaStmtAttr.cpp (+16-13)
  • (modified) clang/lib/Sema/SemaSwift.cpp (+12-12)
  • (modified) clang/lib/Sema/SemaTemplateVariadic.cpp (+5-5)
  • (modified) clang/lib/Sema/SemaType.cpp (+6-7)
  • (modified) clang/lib/Serialization/ASTReader.cpp (+1-1)
  • (modified) clang/lib/Serialization/ASTWriter.cpp (+4-4)
  • (modified) clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp (+1-1)
diff --git a/clang/include/clang/AST/OpenACCClause.h b/clang/include/clang/AST/OpenACCClause.h
index 3687af76a559f..0f09fa7d0a698 100644
--- a/clang/include/clang/AST/OpenACCClause.h
+++ b/clang/include/clang/AST/OpenACCClause.h
@@ -258,7 +258,7 @@ inline bool operator!=(const OpenACCBindClause &LHS,
   return !(LHS == RHS);
 }
 
-using DeviceTypeArgument = std::pair<IdentifierInfo *, SourceLocation>;
+using DeviceTypeArgument = IdentifierLoc;
 /// A 'device_type' or 'dtype' clause, takes a list of either an 'asterisk' or
 /// an identifier. The 'asterisk' means 'the rest'.
 class OpenACCDeviceTypeClause final
@@ -302,7 +302,7 @@ class OpenACCDeviceTypeClause final
   }
   bool hasAsterisk() const {
     return getArchitectures().size() > 0 &&
-           getArchitectures()[0].first == nullptr;
+           getArchitectures()[0].getIdentifierInfo() == nullptr;
   }
 
   ArrayRef<DeviceTypeArgument> getArchitectures() const {
diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h
index 0347880244a40..55ef6e571aff2 100644
--- a/clang/include/clang/Basic/IdentifierTable.h
+++ b/clang/include/clang/Basic/IdentifierTable.h
@@ -76,9 +76,6 @@ inline bool isReservedInAllContexts(ReservedIdentifierStatus Status) {
          Status != ReservedIdentifierStatus::StartsWithUnderscoreAndIsExternC;
 }
 
-/// A simple pair of identifier info and location.
-using IdentifierLocPair = std::pair<IdentifierInfo *, SourceLocation>;
-
 /// IdentifierInfo and other related classes are aligned to
 /// 8 bytes so that DeclarationName can use the lower 3 bits
 /// of a pointer to one of these classes.
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h
index 7a0f5ba8d1270..8039172188746 100644
--- a/clang/include/clang/Basic/SourceLocation.h
+++ b/clang/include/clang/Basic/SourceLocation.h
@@ -31,6 +31,7 @@ template <typename T, typename Enable> struct FoldingSetTrait;
 
 namespace clang {
 
+class IdentifierInfo;
 class SourceManager;
 
 /// An opaque identifier used by SourceManager which refers to a
@@ -466,6 +467,29 @@ class FullSourceLoc : public SourceLocation {
   }
 };
 
+/// A simple pair of identifier info and location.
+class IdentifierLoc {
+  SourceLocation Loc;
+  IdentifierInfo *II = nullptr;
+
+public:
+  IdentifierLoc() = default;
+  IdentifierLoc(SourceLocation L, IdentifierInfo *Ident) : Loc(L), II(Ident) {}
+
+  void setLoc(SourceLocation L) { Loc = L; }
+  void setIdentifierInfo(IdentifierInfo *Ident) { II = Ident; }
+  SourceLocation getLoc() const { return Loc; }
+  IdentifierInfo *getIdentifierInfo() const { return II; }
+
+  bool operator==(const IdentifierLoc &X) const {
+    return Loc == X.Loc && II == X.II;
+  }
+
+  bool operator!=(const IdentifierLoc &X) const {
+    return Loc != X.Loc || II != X.II;
+  }
+};
+
 } // namespace clang
 
 namespace llvm {
diff --git a/clang/include/clang/Lex/ModuleLoader.h b/clang/include/clang/Lex/ModuleLoader.h
index f880a9091a2ed..16597bbcb1a30 100644
--- a/clang/include/clang/Lex/ModuleLoader.h
+++ b/clang/include/clang/Lex/ModuleLoader.h
@@ -29,7 +29,7 @@ class IdentifierInfo;
 
 /// A sequence of identifier/location pairs used to describe a particular
 /// module or submodule, e.g., std.vector.
-using ModuleIdPath = ArrayRef<std::pair<IdentifierInfo *, SourceLocation>>;
+using ModuleIdPath = ArrayRef<IdentifierLoc>;
 
 /// Describes the result of attempting to load a module.
 class ModuleLoadResult {
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index 24bb524783e93..f8f2f567f9171 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -327,7 +327,7 @@ class Preprocessor {
   SourceLocation ModuleImportLoc;
 
   /// The import path for named module that we're currently processing.
-  SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> NamedModuleImportPath;
+  SmallVector<IdentifierLoc, 2> NamedModuleImportPath;
 
   llvm::DenseMap<FileID, SmallVector<const char *>> CheckPoints;
   unsigned CheckPointCounter = 0;
@@ -622,7 +622,7 @@ class Preprocessor {
 
   /// The identifier and source location of the currently-active
   /// \#pragma clang arc_cf_code_audited begin.
-  std::pair<IdentifierInfo *, SourceLocation> PragmaARCCFCodeAuditedInfo;
+  IdentifierLoc PragmaARCCFCodeAuditedInfo;
 
   /// The source location of the currently-active
   /// \#pragma clang assume_nonnull begin.
@@ -1998,8 +1998,7 @@ class Preprocessor {
   /// arc_cf_code_audited begin.
   ///
   /// Returns an invalid location if there is no such pragma active.
-  std::pair<IdentifierInfo *, SourceLocation>
-  getPragmaARCCFCodeAuditedInfo() const {
+  IdentifierLoc getPragmaARCCFCodeAuditedInfo() const {
     return PragmaARCCFCodeAuditedInfo;
   }
 
@@ -2007,7 +2006,7 @@ class Preprocessor {
   /// arc_cf_code_audited begin.  An invalid location ends the pragma.
   void setPragmaARCCFCodeAuditedInfo(IdentifierInfo *Ident,
                                      SourceLocation Loc) {
-    PragmaARCCFCodeAuditedInfo = {Ident, Loc};
+    PragmaARCCFCodeAuditedInfo = IdentifierLoc(Loc, Ident);
   }
 
   /// The location of the currently-active \#pragma clang
diff --git a/clang/include/clang/Parse/LoopHint.h b/clang/include/clang/Parse/LoopHint.h
index cec5605ea3615..d8e67a6a79490 100644
--- a/clang/include/clang/Parse/LoopHint.h
+++ b/clang/include/clang/Parse/LoopHint.h
@@ -14,7 +14,6 @@
 namespace clang {
 
 class Expr;
-struct IdentifierLoc;
 
 /// Loop optimization hint for loop and unroll pragmas.
 struct LoopHint {
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index 53da6269a3b11..fcc81b0c8f006 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -1725,8 +1725,8 @@ class Parser : public CodeCompletionHandler {
   ObjCTypeParamList *parseObjCTypeParamList();
   ObjCTypeParamList *parseObjCTypeParamListOrProtocolRefs(
       ObjCTypeParamListScope &Scope, SourceLocation &lAngleLoc,
-      SmallVectorImpl<IdentifierLocPair> &protocolIdents,
-      SourceLocation &rAngleLoc, bool mayBeProtocolList = true);
+      SmallVectorImpl<IdentifierLoc> &protocolIdents, SourceLocation &rAngleLoc,
+      bool mayBeProtocolList = true);
 
   void HelperActionsForIvarDeclarations(ObjCContainerDecl *interfaceDecl,
                                         SourceLocation atLoc,
@@ -3816,8 +3816,7 @@ class Parser : public CodeCompletionHandler {
                                SourceLocation Loc,
                                llvm::SmallVectorImpl<Expr *> &IntExprs);
   /// Parses the 'device-type-list', which is a list of identifiers.
-  bool ParseOpenACCDeviceTypeList(
-      llvm::SmallVector<std::pair<IdentifierInfo *, SourceLocation>> &Archs);
+  bool ParseOpenACCDeviceTypeList(llvm::SmallVector<IdentifierLoc> &Archs);
   /// Parses the 'async-argument', which is an integral value with two
   /// 'special' values that are likely negative (but come from Macros).
   OpenACCIntExprParseResult ParseOpenACCAsyncArgument(OpenACCDirectiveKind DK,
@@ -3949,10 +3948,8 @@ class Parser : public CodeCompletionHandler {
     return false;
   }
 
-  bool ParseModuleName(
-      SourceLocation UseLoc,
-      SmallVectorImpl<std::pair<IdentifierInfo *, SourceLocation>> &Path,
-      bool IsImport);
+  bool ParseModuleName(SourceLocation UseLoc,
+                       SmallVectorImpl<IdentifierLoc> &Path, bool IsImport);
 
   //===--------------------------------------------------------------------===//
   // C++11/G++: Type Traits [Type-Traits.html in the GCC manual]
diff --git a/clang/include/clang/Sema/ParsedAttr.h b/clang/include/clang/Sema/ParsedAttr.h
index b88b871dc8821..428d3111de80d 100644
--- a/clang/include/clang/Sema/ParsedAttr.h
+++ b/clang/include/clang/Sema/ParsedAttr.h
@@ -40,7 +40,6 @@ class LangOptions;
 class Sema;
 class Stmt;
 class TargetInfo;
-struct IdentifierLoc;
 
 /// Represents information about a change in availability for
 /// an entity, which is part of the encoding of the 'availability'
@@ -99,15 +98,6 @@ struct PropertyData {
 
 } // namespace detail
 
-/// Wraps an identifier and optional source location for the identifier.
-struct IdentifierLoc {
-  SourceLocation Loc;
-  IdentifierInfo *Ident;
-
-  static IdentifierLoc *create(ASTContext &Ctx, SourceLocation Loc,
-                               IdentifierInfo *Ident);
-};
-
 /// A union of the various pointer types that can be passed to an
 /// ParsedAttr as an argument.
 using ArgsUnion = llvm::PointerUnion<Expr *, IdentifierLoc *>;
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 5ab0af8234e26..8c68830001fd9 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -143,7 +143,7 @@ enum class LangAS : unsigned int;
 class LocalInstantiationScope;
 class LookupResult;
 class MangleNumberingContext;
-typedef ArrayRef<std::pair<IdentifierInfo *, SourceLocation>> ModuleIdPath;
+typedef ArrayRef<IdentifierLoc> ModuleIdPath;
 class ModuleLoader;
 class MultiLevelTemplateArgumentList;
 struct NormalizedConstraint;
diff --git a/clang/include/clang/Sema/SemaCodeCompletion.h b/clang/include/clang/Sema/SemaCodeCompletion.h
index 72159de3a6e72..3029e56e5cfe2 100644
--- a/clang/include/clang/Sema/SemaCodeCompletion.h
+++ b/clang/include/clang/Sema/SemaCodeCompletion.h
@@ -193,8 +193,7 @@ class SemaCodeCompletion : public SemaBase {
   void CodeCompleteObjCForCollection(Scope *S, DeclGroupPtrTy IterationVar);
   void CodeCompleteObjCSelector(Scope *S,
                                 ArrayRef<const IdentifierInfo *> SelIdents);
-  void
-  CodeCompleteObjCProtocolReferences(ArrayRef<IdentifierLocPair> Protocols);
+  void CodeCompleteObjCProtocolReferences(ArrayRef<IdentifierLoc> Protocols);
   void CodeCompleteObjCProtocolDecl(Scope *S);
   void CodeCompleteObjCInterfaceDecl(Scope *S);
   void CodeCompleteObjCClassForwardDecl(Scope *S);
diff --git a/clang/include/clang/Sema/SemaObjC.h b/clang/include/clang/Sema/SemaObjC.h
index 791a7f45b832f..4cda41a82b61f 100644
--- a/clang/include/clang/Sema/SemaObjC.h
+++ b/clang/include/clang/Sema/SemaObjC.h
@@ -307,11 +307,11 @@ class SemaObjC : public SemaBase {
 
   DeclGroupPtrTy
   ActOnForwardProtocolDeclaration(SourceLocation AtProtoclLoc,
-                                  ArrayRef<IdentifierLocPair> IdentList,
+                                  ArrayRef<IdentifierLoc> IdentList,
                                   const ParsedAttributesView &attrList);
 
   void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer,
-                               ArrayRef<IdentifierLocPair> ProtocolId,
+                               ArrayRef<IdentifierLoc> ProtocolId,
                                SmallVectorImpl<Decl *> &Protocols);
 
   void DiagnoseTypeArgsAndProtocols(IdentifierInfo *ProtocolId,
diff --git a/clang/include/clang/Sema/SemaOpenACC.h b/clang/include/clang/Sema/SemaOpenACC.h
index 4c3a13a3b044f..8d31d46444c7e 100644
--- a/clang/include/clang/Sema/SemaOpenACC.h
+++ b/clang/include/clang/Sema/SemaOpenACC.h
@@ -212,7 +212,7 @@ class SemaOpenACC : public SemaBase {
   } LoopWithoutSeqInfo;
 
   // Redeclaration of the version in OpenACCClause.h.
-  using DeviceTypeArgument = std::pair<IdentifierInfo *, SourceLocation>;
+  using DeviceTypeArgument = IdentifierLoc;
 
   /// A type to represent all the data for an OpenACC Clause that has been
   /// parsed, but not yet created/semantically analyzed. This is effectively a
diff --git a/clang/lib/AST/OpenACCClause.cpp b/clang/lib/AST/OpenACCClause.cpp
index d7cbb51335359..2820d7b288658 100644
--- a/clang/lib/AST/OpenACCClause.cpp
+++ b/clang/lib/AST/OpenACCClause.cpp
@@ -891,10 +891,10 @@ void OpenACCClausePrinter::VisitDeviceTypeClause(
   OS << "(";
   llvm::interleaveComma(C.getArchitectures(), OS,
                         [&](const DeviceTypeArgument &Arch) {
-                          if (Arch.first == nullptr)
+                          if (Arch.getIdentifierInfo() == nullptr)
                             OS << "*";
                           else
-                            OS << Arch.first->getName();
+                            OS << Arch.getIdentifierInfo()->getName();
                         });
   OS << ")";
 }
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index b90f32389c897..1fce87ce3c9ae 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -500,10 +500,10 @@ void TextNodeDumper::Visit(const OpenACCClause *C) {
       llvm::interleaveComma(
           cast<OpenACCDeviceTypeClause>(C)->getArchitectures(), OS,
           [&](const DeviceTypeArgument &Arch) {
-            if (Arch.first == nullptr)
+            if (Arch.getIdentifierInfo() == nullptr)
               OS << "*";
             else
-              OS << Arch.first->getName();
+              OS << Arch.getIdentifierInfo()->getName();
           });
       OS << ")";
       break;
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index eb138de9d20cc..9fb89b96c2c77 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -35,6 +35,7 @@
 #include "clang/Lex/Preprocessor.h"
 #include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Sema/CodeCompleteConsumer.h"
+#include "clang/Sema/ParsedAttr.h"
 #include "clang/Sema/Sema.h"
 #include "clang/Serialization/ASTReader.h"
 #include "clang/Serialization/GlobalModuleIndex.h"
@@ -2028,8 +2029,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
                              Module::NameVisibilityKind Visibility,
                              bool IsInclusionDirective) {
   // Determine what file we're searching from.
-  StringRef ModuleName = Path[0].first->getName();
-  SourceLocation ModuleNameLoc = Path[0].second;
+  StringRef ModuleName = Path[0].getIdentifierInfo()->getName();
+  SourceLocation ModuleNameLoc = Path[0].getLoc();
 
   // If we've already handled this import, just return the cached result.
   // This one-element cache is important to eliminate redundant diagnostics
@@ -2045,7 +2046,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
   // If we don't already have information on this module, load the module now.
   Module *Module = nullptr;
   ModuleMap &MM = getPreprocessor().getHeaderSearchInfo().getModuleMap();
-  if (auto MaybeModule = MM.getCachedModuleLoad(*Path[0].first)) {
+  if (auto MaybeModule = MM.getCachedModuleLoad(*Path[0].getIdentifierInfo())) {
     // Use the cached result, which may be nullptr.
     Module = *MaybeModule;
     // Config macros are already checked before building a module, but they need
@@ -2065,7 +2066,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
     // * `Preprocessor::HandleHeaderIncludeOrImport` will never call this
     //   function as the `#include` or `#import` is textual.
 
-    MM.cacheModuleLoad(*Path[0].first, Module);
+    MM.cacheModuleLoad(*Path[0].getIdentifierInfo(), Module);
   } else {
     ModuleLoadResult Result = findOrCompileModuleAndReadAST(
         ModuleName, ImportLoc, ModuleNameLoc, IsInclusionDirective);
@@ -2074,7 +2075,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
     if (!Result)
       DisableGeneratingGlobalModuleIndex = true;
     Module = Result;
-    MM.cacheModuleLoad(*Path[0].first, Module);
+    MM.cacheModuleLoad(*Path[0].getIdentifierInfo(), Module);
   }
 
   // If we never found the module, fail.  Otherwise, verify the module and link
@@ -2086,7 +2087,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
   // a submodule.
   bool MapPrivateSubModToTopLevel = false;
   for (unsigned I = 1, N = Path.size(); I != N; ++I) {
-    StringRef Name = Path[I].first->getName();
+    StringRef Name = Path[I].getIdentifierInfo()->getName();
     clang::Module *Sub = Module->findSubmodule(Name);
 
     // If the user is requesting Foo.Private and it doesn't exist, try to
@@ -2097,10 +2098,10 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
       SmallString<128> PrivateModule(Module->Name);
       PrivateModule.append("_Private");
 
-      SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> PrivPath;
+      SmallVector<IdentifierLoc, 2> PrivPath;
       auto &II = PP->getIdentifierTable().get(
           PrivateModule, PP->getIdentifierInfo(Module->Name)->getTokenID());
-      PrivPath.push_back(std::make_pair(&II, Path[0].second));
+      PrivPath.emplace_back(Path[0].getLoc(), &II);
 
       std::string FileName;
       // If there is a modulemap module or prebuilt module, load it.
@@ -2114,11 +2115,12 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
         PP->markClangModuleAsAffecting(Module);
         if (!getDiagnostics().isIgnored(
                 diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {
-          getDiagnostics().Report(Path[I].second,
+          getDiagnostics().Report(Path[I].getLoc(),
                                   diag::warn_no_priv_submodule_use_toplevel)
-              << Path[I].first << Module->getFullModuleName() << PrivateModule
-              << SourceRange(Path[0].second, Path[I].second)
-              << FixItHint::CreateReplacement(SourceRange(Path[0].second),
+              << Path[I].getIdentifierInfo() << Module->getFullModuleName()
+              << PrivateModule
+              << SourceRange(Path[0].getLoc(), Path[I].getLoc())
+              << FixItHint::CreateReplacement(SourceRange(Path[0].getLoc()),
                                               PrivateModule);
           getDiagnostics().Report(Sub->DefinitionLoc,
                                   diag::note_private_top_level_defined);
@@ -2147,10 +2149,11 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
 
       // If there was a clear winner, user it.
       if (Best.size() == 1) {
-        getDiagnostics().Report(Path[I].second, diag::err_no_submodule_suggest)
-            << Path[I].first << Module->getFullModuleName() << Best[0]
-            << SourceRange(Path[0].second, Path[I - 1].second)
-            << FixItHint::CreateReplacement(SourceRange(Path[I].second),
+        getDiagnostics().Report(Path[I].getLoc(),
+                                diag::err_no_submodule_suggest)
+            << Path[I].getIdentifierInfo() << Module->getFullModuleName()
+            << Best[0] << SourceRange(Path[0].getLoc(), Path[I - 1].getLoc())
+            << FixItHint::CreateReplacement(SourceRange(Path[I].getLoc()),
                                             Best[0]);
 
         Sub = Module->findSubmodule(Best[0]);
@@ -2160,9 +2163,9 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
     if (!Sub) {
       // No submodule by this name. Complain, and don't look for further
       // submodules.
-      getDiagnostics().Report(Path[I].second, diag::err_no_submodule)
-          << Path[I].first << Module->getFullModuleName()
-          << SourceRange(Path[0].second, Path[I - 1].second);
+      getDiagnostics().Report(Path[I].getLoc(), diag::err_no_submodule)
+          << Path[I].getIdentifierInfo() << Module->getFullModuleName()
+          << SourceRange(Path[0].getLoc(), Path[I - 1].getLoc());
       break;
     }
 
@@ -2180,8 +2183,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
       // FIXME: Should we detect this at module load time? It seems fairly
       // expensive (and rare).
       getDiagnostics().Report(ImportLoc, diag::warn_missing_submodule)
-        << Module->getFullModuleName()
-        << SourceRange(Path.front().second, Path.back().second);
+          << Module->getFullModuleName()
+          << SourceRange(Path.front().getLoc(), Path.back().getLoc());
 
       return ModuleLoadResult(Module, ModuleLoadResult::MissingExpected);
     }
@@ -2190,7 +2193,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
     if (Preprocessor::checkModuleIsAvailable(getLangOpts(), getTarget(),
                                              *Module, getDiagnostics())) {
       getDiagnostics().Report(ImportLoc, diag::note_module_import_here)
-        << SourceRange(Path.front().second, Path.back().second);
+          << SourceRange(Path.front().getLoc(), Path.back().getLoc());
       LastModuleImportLoc = ImportLoc;
       LastModuleImportResult = ModuleLoadResult();
       return ModuleLoadResult();
@@ -2316,9 +2319,9 @@ G...
[truncated]

Copy link
Collaborator

@erichkeane erichkeane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I REALLY like this. I THINK this ends up being pretty trivial implementation for most of the files, and did a quick overlook on it, but please let another person or two do the scroll through to mkae sure I didnt miss anything.

Copy link
Contributor

@mizvekov mizvekov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I like the idea!

@cor3ntin cor3ntin closed this Apr 15, 2025
@cor3ntin cor3ntin reopened this Apr 15, 2025
Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but make sure to address Matheus's comments

@yronglin
Copy link
Contributor Author

@mizvekov @cor3ntin @erichkeane Thanks for your review!

Signed-off-by: yronglin <[email protected]>
Copy link
Contributor

@mizvekov mizvekov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, otherwise LGTM, thanks!

…orward declaration in SourceLocation

Signed-off-by: yronglin <[email protected]>
@yronglin
Copy link
Contributor Author

Thanks for the comments! Wait for CI green.

@yronglin yronglin merged commit d3153ad into llvm:main Apr 16, 2025
13 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building clang-tools-extra,clang at step 4 "build".

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

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
152.022 [57/72/884] Linking CXX executable bin/llvm-readtapi
152.023 [56/72/885] Generating ../../bin/llvm-ml64
152.072 [55/72/886] Linking CXX executable bin/llvm-sim
152.089 [54/72/887] Copying llvm-locstats into /home/worker/2.0.1/lldb-x86_64-debian/build/./bin
152.104 [54/71/888] Building CXX object tools/clang/tools/clang-repl/CMakeFiles/clang-repl.dir/ClangRepl.cpp.o
152.111 [54/70/889] Linking CXX executable bin/llvm-readobj
152.127 [53/70/890] Generating ../../bin/llvm-readelf
152.211 [53/69/891] Linking CXX executable bin/llvm-size
152.220 [53/68/892] Building CXX object tools/lldb/source/Plugins/Platform/AIX/CMakeFiles/lldbPluginPlatformAIX.dir/PlatformAIX.cpp.o
152.242 [53/67/893] 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 
/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/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/include -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include -I/usr/include/python3.11 -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/../clang/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/../clang/include -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -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 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<clang::IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:73:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const clang::IdentifierLoc &' for 1st argument
    /*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)
                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:118:28: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::initializer_list<IdentifierLoc>' for 1st argument
    constexpr /*implicit*/ ArrayRef(
                           ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:91:18: note: candidate template ignored: could not match 'SmallVectorTemplateCommon' against 'pair'
    /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:97:18: note: candidate template ignored: could not match 'vector' against 'pair'
    /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:102:28: note: candidate template ignored: could not match 'array' against 'pair'
    /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
                           ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:107:28: note: candidate template ignored: could not match 'clang::IdentifierLoc[N]' against 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>'
    /*implicit*/ constexpr ArrayRef(const T (&Arr LLVM_LIFETIME_BOUND)[N])
                           ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:129:5: note: candidate template ignored: could not match 'ArrayRef' against 'pair'
    ArrayRef(const ArrayRef<U *> &A,
    ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:138:18: note: candidate template ignored: could not match 'SmallVectorTemplateCommon' against 'pair'
    /*implicit*/ ArrayRef(
                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:147:5: note: candidate template ignored: could not match 'vector' against 'pair'
    ArrayRef(const std::vector<U *, A> &Vec,
    ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building clang-tools-extra,clang at step 4 "build".

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

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
296.098 [159/88/6366] Building CXX object tools/llvm-objcopy/CMakeFiles/llvm-objcopy.dir/llvm-objcopy-driver.cpp.o
296.109 [158/88/6367] Linking CXX executable bin/llvm-yaml-numeric-parser-fuzzer
296.146 [158/87/6368] Linking CXX executable bin/llvm-pdbutil
296.168 [158/86/6369] Linking CXX executable bin/llvm-rust-demangle-fuzzer
296.181 [158/85/6370] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCTrampolineHandler.cpp.o
296.197 [158/84/6371] Linking CXX executable bin/llvm-yaml-parser-fuzzer
296.291 [158/83/6372] Building CXX object tools/lldb/source/Plugins/Language/CPlusPlus/CMakeFiles/lldbPluginCPlusPlusLanguage.dir/GenericBitset.cpp.o
296.326 [158/82/6373] Linking CXX executable bin/llvm-dwarfdump
296.330 [157/82/6374] Linking CXX executable bin/llvm-stress
296.333 [157/81/6375] 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 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/llvm/../clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/../clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/source -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -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 -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/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
../llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:138:61: error: no viable conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const std::pair<IdentifierInfo *, SourceLocation>'
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                             ^         ~
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:314:17: note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const pair<IdentifierInfo *, SourceLocation> &' for 1st argument
  314 |       constexpr pair(const pair&) = default;    ///< Copy constructor
      |                 ^    ~~~~~~~~~~~
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:315:17: note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'pair<IdentifierInfo *, SourceLocation> &&' for 1st argument
  315 |       constexpr pair(pair&&) = default;         ///< Move constructor
      |                 ^    ~~~~~~
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:300:19: note: candidate template ignored: could not match 'const pair<_U1, _U2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  300 |         constexpr pair(const pair<_U1, _U2>& __p)
      |                   ^
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:371:12: note: candidate template ignored: could not match 'pair<_U1, _U2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  371 |         constexpr pair(pair<_U1, _U2>&& __p)
      |                   ^
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:309:21: note: explicit constructor is not a candidate
  309 |         explicit constexpr pair(const pair<_U1, _U2>& __p)
      |                            ^
/usr/lib/gcc/arm-linux-gnueabihf/11/../../../../include/c++/11/bits/stl_pair.h:381:21: note: explicit constructor is not a candidate
  381 |         explicit constexpr pair(pair<_U1, _U2>&& __p)
      |                            ^
../llvm-project/llvm/include/llvm/ADT/ArrayRef.h:156:14: note: selected 'begin' function with iterator type 'iterator' (aka 'const clang::IdentifierLoc *')
  156 |     iterator begin() const { return Data; }
      |              ^
1 error generated.
296.341 [157/80/6376] Linking CXX executable bin/llvm-strings
296.346 [157/79/6377] Copying llvm-locstats into /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin
296.408 [157/78/6378] Linking CXX executable bin/llvm-extract
296.417 [157/77/6379] Linking CXX executable bin/llvm-sim
296.431 [157/76/6380] Building CXX object tools/lldb/source/Version/CMakeFiles/lldbVersion.dir/Version.cpp.o
296.449 [157/75/6381] Linking CXX executable bin/llvm-mc
296.505 [157/74/6382] Linking CXX executable bin/llvm-size
296.555 [157/73/6383] Linking CXX executable bin/obj2yaml
296.555 [157/72/6384] Linking CXX executable bin/llvm-ml
296.564 [157/71/6385] Linking CXX executable bin/llvm-readtapi
296.582 [157/70/6386] Linking CXX executable bin/sanstats
296.591 [157/69/6387] Linking CXX executable bin/llvm-rc

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

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

Here is the relevant piece of the build log for the reference
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

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-win running on as-builder-10 while building clang-tools-extra,clang at step 8 "build-default".

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

Here is the relevant piece of the build log for the reference
Step 8 (build-default) failure: cmake (failure)
...
462.558 [198/59/5171]Building CXX object tools\lldb\source\Plugins\LanguageRuntime\ObjC\AppleObjCRuntime\CMakeFiles\lldbPluginAppleObjCRuntime.dir\AppleObjCRuntime.cpp.obj
462.568 [198/58/5172]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\AppleGetThreadItemInfoHandler.cpp.obj
462.654 [198/57/5173]Building CXX object tools\lldb\source\Plugins\Platform\NetBSD\CMakeFiles\lldbPluginPlatformNetBSD.dir\PlatformNetBSD.cpp.obj
462.756 [198/56/5174]Building CXX object tools\lldb\source\Plugins\LanguageRuntime\ObjC\GNUstepObjCRuntime\CMakeFiles\lldbPluginGNUstepObjCRuntime.dir\GNUstepObjCRuntime.cpp.obj
463.209 [198/55/5175]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ASTResultSynthesizer.cpp.obj
463.237 [198/54/5176]Building CXX object tools\lldb\source\Plugins\LanguageRuntime\ObjC\CMakeFiles\lldbPluginObjCRuntime.dir\ObjCLanguageRuntime.cpp.obj
463.265 [198/53/5177]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\AppleGetQueuesHandler.cpp.obj
463.318 [198/52/5178]Building CXX object tools\lldb\source\Plugins\Platform\Linux\CMakeFiles\lldbPluginPlatformLinux.dir\PlatformLinux.cpp.obj
463.726 [198/51/5179]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ASTStructExtractor.cpp.obj
463.754 [198/50/5180]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangModulesDeclVendor.cpp.obj
FAILED: tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.obj 
ccache C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe  /nologo /TP -DCLANG_BUILD_STATIC -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_GLIBCXX_ASSERTIONS -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-10\lldb-x-aarch64\build\tools\lldb\source\Plugins\ExpressionParser\Clang -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\llvm\include -IC:\Python312\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\llvm\..\clang\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\..\clang\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\source -D__OPTIMIZE__ /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  -MD   -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 -wd4589  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangModulesDeclVendor.cpp.obj /Fdtools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\lldbPluginExpressionParserClang.pdb /FS -c C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(360): error C2664: 'clang::ModuleLoadResult `anonymous-namespace'::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath,bool)': cannot convert argument 1 from 'T' to 'clang::ModuleIdPath'
        with
        [
            T=std::pair<clang::IdentifierInfo *,clang::SourceLocation>
        ]
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(360): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(112): note: see declaration of '`anonymous-namespace'::ClangModulesDeclVendorImpl::DoGetModule'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(360): note: while trying to match the argument list '(T, bool)'
        with
        [
            T=std::pair<clang::IdentifierInfo *,clang::SourceLocation>
        ]
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(381): error C2664: 'clang::ModuleLoadResult `anonymous-namespace'::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath,bool)': cannot convert argument 1 from 'llvm::SmallVector<std::pair<clang::IdentifierInfo *,clang::SourceLocation>,4>' to 'clang::ModuleIdPath'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(112): note: see declaration of '`anonymous-namespace'::ClangModulesDeclVendorImpl::DoGetModule'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(381): note: while trying to match the argument list '(llvm::SmallVector<std::pair<clang::IdentifierInfo *,clang::SourceLocation>,4>, bool)'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(632): error C2039: 'second': is not a member of 'clang::IdentifierLoc'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\llvm\..\clang\include\clang/Basic/IdentifierTable.h(1167): note: see declaration of 'clang::IdentifierLoc'
463.963 [198/49/5181]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\SystemRuntimeMacOSX.cpp.obj
463.964 [198/48/5182]Linking CXX executable bin\clang-diff.exe
463.969 [198/47/5183]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\AppleGetPendingItemsHandler.cpp.obj
463.970 [198/46/5184]Linking CXX executable bin\llvm-dwarfdump.exe
464.110 [198/45/5185]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangASTSource.cpp.obj
464.188 [198/44/5186]Building CXX object tools\lldb\source\Plugins\SymbolFile\DWARF\CMakeFiles\lldbPluginSymbolFileDWARF.dir\DWARFASTParserClang.cpp.obj
464.220 [198/43/5187]Building CXX object tools\clang\tools\clang-repl\CMakeFiles\clang-repl.dir\ClangRepl.cpp.obj
464.515 [198/42/5188]Building CXX object tools\clang\tools\libclang\CMakeFiles\libclang.dir\CIndex.cpp.obj
464.626 [198/41/5189]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\AbortWithPayloadFrameRecognizer.cpp.obj
464.785 [198/40/5190]Linking CXX executable bin\clang-refactor.exe
464.816 [198/39/5191]Building CXX object tools\lldb\source\Plugins\RegisterTypeBuilder\CMakeFiles\lldbPluginRegisterTypeBuilderClang.dir\RegisterTypeBuilderClang.cpp.obj
464.859 [198/38/5192]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangUtilityFunction.cpp.obj
465.036 [198/37/5193]Building CXX object tools\lldb\source\Plugins\Language\ObjC\CMakeFiles\lldbPluginObjCLanguage.dir\NSException.cpp.obj
465.086 [198/36/5194]Building CXX object tools\lldb\source\Plugins\LanguageRuntime\CPlusPlus\ItaniumABI\CMakeFiles\lldbPluginCXXItaniumABI.dir\ItaniumABILanguageRuntime.cpp.obj
465.111 [198/35/5195]Building CXX object tools\lldb\source\Plugins\LanguageRuntime\ObjC\AppleObjCRuntime\CMakeFiles\lldbPluginAppleObjCRuntime.dir\AppleObjCTrampolineHandler.cpp.obj
465.145 [198/34/5196]Building CXX object tools\lldb\source\Plugins\SystemRuntime\MacOSX\CMakeFiles\lldbPluginSystemRuntimeMacOSX.dir\AppleGetItemInfoHandler.cpp.obj
465.666 [198/33/5197]Building CXX object tools\lldb\source\Plugins\Language\ObjC\CMakeFiles\lldbPluginObjCLanguage.dir\NSDictionary.cpp.obj
465.882 [198/32/5198]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangFunctionCaller.cpp.obj
465.951 [198/31/5199]Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangPersistentVariables.cpp.obj

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder cross-project-tests-sie-ubuntu running on doug-worker-1a while building clang-tools-extra,clang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
1484.031 [162/8/833] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTSource.cpp.o
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp: In member function ‘clang::TagDecl* lldb_private::ClangASTSource::FindCompleteType(const clang::TagDecl*)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:237:63: warning: cast from type ‘const clang::TagDecl*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
  237 |     TypeQuery query(CompilerDecl(m_clang_ast_context, (void *)decl));
      |                                                               ^~~~
1485.682 [161/8/834] Linking CXX executable bin/clang-scan-deps
1487.396 [160/8/835] Linking CXX executable bin/clang-sycl-linker
1489.830 [159/8/836] Linking CXX executable bin/clang-installapi
1494.424 [158/8/837] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUtil.cpp.o
1494.847 [157/8/838] 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 
/opt/ccache/bin/g++ -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/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -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 /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-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 value_type’ {aka ‘const clang::IdentifierLoc’}
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                                         ^~~~
1494.870 [157/7/839] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionDeclMap.cpp.o
1495.877 [157/6/840] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangFunctionCaller.cpp.o
1496.442 [157/5/841] Linking CXX executable bin/clang-repl
1497.583 [157/4/842] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangPersistentVariables.cpp.o
1500.229 [157/3/843] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUserExpression.cpp.o
1500.295 [157/2/844] 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 
/opt/ccache/bin/g++ -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/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -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 /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: In member function ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-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/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: At global scope:
/home/buildbot/buildbot-root/cross-project-tests-sie-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,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-aarch64-ubuntu running on linaro-lldb-aarch64-ubuntu while building clang-tools-extra,clang at step 4 "build".

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

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
1512.669 [1224/5/5384] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangDeclVendor.cpp.o
1512.697 [1218/10/5385] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionUtil.cpp.o
1512.709 [1217/10/5386] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionSourceCode.cpp.o
1512.917 [1216/10/5387] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTImporter.cpp.o
1512.938 [1215/10/5388] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangHost.cpp.o
1518.645 [1215/9/5389] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionVariable.cpp.o
1518.880 [1215/8/5390] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTSource.cpp.o
1519.827 [1214/8/5391] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExternalASTSourceCallbacks.cpp.o
1521.910 [1214/7/5392] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionDeclMap.cpp.o
1522.632 [1214/6/5393] 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 
/usr/local/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/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/llvm/../clang/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/../clang/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -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 -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/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
../llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:138:61: error: no viable conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const std::pair<IdentifierInfo *, SourceLocation>'
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                             ^         ~
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:314:17: note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const pair<IdentifierInfo *, SourceLocation> &' for 1st argument
  314 |       constexpr pair(const pair&) = default;    ///< Copy constructor
      |                 ^    ~~~~~~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:315:17: note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'pair<IdentifierInfo *, SourceLocation> &&' for 1st argument
  315 |       constexpr pair(pair&&) = default;         ///< Move constructor
      |                 ^    ~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:300:19: note: candidate template ignored: could not match 'const pair<_U1, _U2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  300 |         constexpr pair(const pair<_U1, _U2>& __p)
      |                   ^
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:371:12: note: candidate template ignored: could not match 'pair<_U1, _U2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  371 |         constexpr pair(pair<_U1, _U2>&& __p)
      |                   ^
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:309:21: note: explicit constructor is not a candidate
  309 |         explicit constexpr pair(const pair<_U1, _U2>& __p)
      |                            ^
/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:381:21: note: explicit constructor is not a candidate
  381 |         explicit constexpr pair(pair<_U1, _U2>&& __p)
      |                            ^
../llvm-project/llvm/include/llvm/ADT/ArrayRef.h:156:14: note: selected 'begin' function with iterator type 'iterator' (aka 'const clang::IdentifierLoc *')
  156 |     iterator begin() const { return Data; }
      |              ^
1 error generated.
1523.003 [1214/5/5394] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangPersistentVariables.cpp.o
1524.250 [1214/4/5395] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangFunctionCaller.cpp.o
1524.898 [1214/3/5396] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUserExpression.cpp.o
1525.307 [1214/2/5397] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUtil.cpp.o
1525.508 [1214/1/5398] 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 
/usr/local/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/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/llvm/../clang/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/../clang/include -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source -I/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -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 -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/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
../llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  360 |   clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
      |                                                 ^~~~~~~~~~~~~~~~~~
../llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const ArrayRef<IdentifierLoc> &' for 1st argument
   41 |   class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder cross-project-tests-sie-ubuntu-dwarf5 running on doug-worker-1b while building clang-tools-extra,clang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
2255.527 [232/8/763] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangDeclVendor.cpp.o
2257.906 [231/8/764] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionVariable.cpp.o
2266.367 [230/8/765] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTSource.cpp.o
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp: In member function ‘clang::TagDecl* lldb_private::ClangASTSource::FindCompleteType(const clang::TagDecl*)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:237:55: warning: cast from type ‘const clang::TagDecl*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
  237 |     TypeQuery query(CompilerDecl(m_clang_ast_context, (void *)decl));
      |                                                       ^~~~~~~~~~~~
2268.030 [229/8/766] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTImporter.cpp.o
2268.441 [228/8/767] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExternalASTSourceCallbacks.cpp.o
2279.600 [227/8/768] 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 
/opt/ccache/bin/g++ -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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -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 /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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 value_type’ {aka ‘const clang::IdentifierLoc’}
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                                         ^~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:138:61: warning: loop variable ‘component’ of type ‘const std::pair<clang::IdentifierInfo*, clang::SourceLocation>&’ binds to a temporary constructed from type ‘const value_type’ {aka ‘const clang::IdentifierLoc’} [-Wrange-loop-construct]
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                             ^~~~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:138:61: note: use non-reference type ‘const std::pair<clang::IdentifierInfo*, clang::SourceLocation>’ to make the copy explicit or ‘const value_type&’ {aka ‘const clang::IdentifierLoc&’} to prevent copying
2281.292 [227/7/769] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionDeclMap.cpp.o
2282.189 [227/6/770] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUtil.cpp.o
2282.266 [227/5/771] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangFunctionCaller.cpp.o
2282.469 [227/4/772] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangPersistentVariables.cpp.o
2287.293 [227/3/773] 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 
/opt/ccache/bin/g++ -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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -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 /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: In member function ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/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/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: At global scope:

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-aarch64-windows running on linaro-armv8-windows-msvc-05 while building clang-tools-extra,clang at step 4 "build".

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

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
1231.003 [3905/10/2799] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ASTStructExtractor.cpp.obj
1233.069 [3904/10/2800] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ASTResultSynthesizer.cpp.obj
1233.203 [3903/10/2801] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangHost.cpp.obj
1235.654 [3902/10/2802] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangDeclVendor.cpp.obj
1237.942 [3901/10/2803] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangExpressionVariable.cpp.obj
1242.130 [3900/10/2804] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangExternalASTSourceCallbacks.cpp.obj
1242.397 [3899/10/2805] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangASTSource.cpp.obj
1242.802 [3898/10/2806] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\CppModuleConfiguration.cpp.obj
1243.410 [3897/10/2807] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangASTImporter.cpp.obj
1251.025 [3896/10/2808] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangExpressionParser.cpp.obj
FAILED: tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionParser.cpp.obj 
ccache C:\Users\tcwg\scoop\apps\llvm-arm64\current\bin\clang-cl.exe  /nologo -TP -DCLANG_BUILD_STATIC -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\source\Plugins\ExpressionParser\Clang -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include -IC:\Users\tcwg\scoop\apps\python\current\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\..\clang\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\..\clang\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\source /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported /Gw -Wno-vla-extension /O2 /Ob2 /DNDEBUG -std:c++17 -MD   -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 -wd4589  /EHs-c- /GR- /showIncludes /Fotools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangExpressionParser.cpp.obj /Fdtools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\lldbPluginExpressionParserClang.pdb -c -- C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangExpressionParser.cpp
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangExpressionParser.cpp(138,61): error: no viable conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const std::pair<IdentifierInfo *, SourceLocation>'
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                             ^         ~
c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\utility(175,5): note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'const pair<IdentifierInfo *, SourceLocation> &' for 1st argument
  175 |     pair(const pair&) = default;
      |     ^    ~~~~~~~~~~~
c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\utility(176,5): note: candidate constructor not viable: no known conversion from 'const value_type' (aka 'const clang::IdentifierLoc') to 'pair<IdentifierInfo *, SourceLocation> &&' for 1st argument
  176 |     pair(pair&&)      = default;
      |     ^    ~~~~~~
c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\utility(191,9): note: candidate template ignored: could not match 'const pair<_Other1, _Other2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  191 |         pair(const pair<_Other1, _Other2>& _Right) noexcept(is_nothrow_constructible_v<_Ty1, const _Other1&>&&
      |         ^
c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\utility(198,9): note: candidate template ignored: could not match 'pair<_Other1, _Other2>' against 'const value_type' (aka 'const clang::IdentifierLoc')
  198 |         pair(pair<_Other1, _Other2>&& _Right) noexcept(
      |         ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include\llvm/ADT/ArrayRef.h(156,14): note: selected 'begin' function with iterator type 'iterator' (aka 'const clang::IdentifierLoc *')
  156 |     iterator begin() const { return Data; }
      |              ^
1 error generated.
1255.104 [3896/9/2809] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangFunctionCaller.cpp.obj
1255.120 [3896/8/2810] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangUtil.cpp.obj
1255.296 [3896/7/2811] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangExpressionDeclMap.cpp.obj
1256.403 [3896/6/2812] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangPersistentVariables.cpp.obj
1260.340 [3896/5/2813] Building CXX object tools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangModulesDeclVendor.cpp.obj
FAILED: tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangModulesDeclVendor.cpp.obj 
ccache C:\Users\tcwg\scoop\apps\llvm-arm64\current\bin\clang-cl.exe  /nologo -TP -DCLANG_BUILD_STATIC -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\source\Plugins\ExpressionParser\Clang -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include -IC:\Users\tcwg\scoop\apps\python\current\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\..\clang\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\..\clang\include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\source /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported /Gw -Wno-vla-extension /O2 /Ob2 /DNDEBUG -std:c++17 -MD   -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 -wd4589  /EHs-c- /GR- /showIncludes /Fotools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\ClangModulesDeclVendor.cpp.obj /Fdtools\lldb\source\Plugins\ExpressionParser\Clang\CMakeFiles\lldbPluginExpressionParserClang.dir\lldbPluginExpressionParserClang.pdb -c -- C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Plugins\ExpressionParser\Clang\ClangModulesDeclVendor.cpp(360,49): error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  360 |   clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
      |                                                 ^~~~~~~~~~~~~~~~~~
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include\llvm/ADT/ArrayRef.h(41,40): note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const ArrayRef<IdentifierLoc> &' for 1st argument
   41 |   class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
      |                                        ^~~~~~~~
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include\llvm/ADT/ArrayRef.h(41,40): note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'ArrayRef<IdentifierLoc> &&' for 1st argument
   41 |   class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
      |                                        ^~~~~~~~
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include\llvm/ADT/ArrayRef.h(70,18): note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
   70 |     /*implicit*/ ArrayRef(std::nullopt_t) {}

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder publish-sphinx-docs running on as-worker-4 while building clang-tools-extra,clang at step 5 "build-docs-llvm-html-docs-clang-html-docs-clang...".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-docs-llvm-html-docs-clang-html-docs-clang...) failure: build (failure)
...
1518.896 [707/24/4589] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTImporter.cpp.o
1519.375 [706/24/4590] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangFunctionCaller.cpp.o
1519.645 [705/24/4591] Building CXX object tools/lldb/source/Plugins/InstrumentationRuntime/Utility/CMakeFiles/lldbPluginInstrumentationRuntimeUtility.dir/Utility.cpp.o
1519.839 [704/24/4592] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/CxxModuleHandler.cpp.o
1520.927 [703/24/4593] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUtilityFunction.cpp.o
1521.064 [702/24/4594] Building CXX object tools/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/CMakeFiles/lldbPluginInstrumentationRuntimeMainThreadChecker.dir/InstrumentationRuntimeMainThreadChecker.cpp.o
1521.601 [701/24/4595] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/NameSearchContext.cpp.o
1522.773 [700/24/4596] Building CXX object tools/lldb/source/Plugins/InstrumentationRuntime/Utility/CMakeFiles/lldbPluginInstrumentationRuntimeUtility.dir/ReportRetriever.cpp.o
1522.784 [699/24/4597] Building CXX object tools/lldb/source/Plugins/Language/CPlusPlus/CMakeFiles/lldbPluginCPlusPlusLanguage.dir/CPlusPlusNameParser.cpp.o
1523.502 [698/24/4598] 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 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -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 /home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
/home/buildbot/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/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 value_type’ {aka ‘const clang::IdentifierLoc’}
  138 |     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
      |                                                                         ^~~~
1523.767 [698/23/4599] Building CXX object tools/lldb/source/Plugins/InstrumentationRuntime/UBSan/CMakeFiles/lldbPluginInstrumentationRuntimeUBSan.dir/InstrumentationRuntimeUBSan.cpp.o
1524.037 [698/22/4600] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUserExpression.cpp.o
1524.593 [698/21/4601] 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 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source -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 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -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 /home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
/home/buildbot/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: In member function ‘clang::ModuleLoadResult {anonymous}::ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath, bool)’:
/home/buildbot/as-worker-4/publish-sphinx-docs/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/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp: At global scope:
/home/buildbot/as-worker-4/publish-sphinx-docs/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,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
1524.656 [698/20/4602] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangExpressionDeclMap.cpp.o
1524.666 [698/19/4603] Building CXX object tools/lldb/source/Plugins/InstrumentationRuntime/TSan/CMakeFiles/lldbPluginInstrumentationRuntimeTSan.dir/InstrumentationRuntimeTSan.cpp.o
1525.067 [698/18/4604] Building CXX object tools/lldb/source/Plugins/JITLoader/GDB/CMakeFiles/lldbPluginJITLoaderGDB.dir/JITLoaderGDB.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building clang-tools-extra,clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
PASS: lit :: shtest-not.py (90224 of 90234)
PASS: lit :: allow-retries.py (90225 of 90234)
PASS: lit :: discovery.py (90226 of 90234)
PASS: lit :: shtest-external-shell-kill.py (90227 of 90234)
PASS: lit :: googletest-timeout.py (90228 of 90234)
PASS: lit :: selecting.py (90229 of 90234)
PASS: lit :: shtest-timeout.py (90230 of 90234)
PASS: lit :: max-time.py (90231 of 90234)
PASS: lit :: shtest-shell.py (90232 of 90234)
PASS: lit :: shtest-define.py (90233 of 90234)
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1853.103678

Michael137 added a commit that referenced this pull request Apr 16, 2025
…e data structures to `IdentifierLoc`" (#135974)

Reverts #135808

Example from the LLDB macOS CI:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/24084/execution/node/54/log/?consoleFull
```
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
```
@Michael137
Copy link
Member

Reverted in #135974 since it's breaking the LLDB build. Let me know if you need help reproducing

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 16, 2025
…*` pair-like data structures to `IdentifierLoc`" (#135974)

Reverts llvm/llvm-project#135808

Example from the LLDB macOS CI:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/24084/execution/node/54/log/?consoleFull
```
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
```
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 16, 2025

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/24869

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
631.495 [118/26/7142] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/NameSearchContext.cpp.o
632.108 [118/25/7143] Building CXX object tools/lldb/source/Plugins/SystemRuntime/MacOSX/CMakeFiles/lldbPluginSystemRuntimeMacOSX.dir/SystemRuntimeMacOSX.cpp.o
632.904 [118/24/7144] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUserExpression.cpp.o
632.962 [118/23/7145] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ASTStructExtractor.cpp.o
633.086 [118/22/7146] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUtilityFunction.cpp.o
633.088 [118/21/7147] Building CXX object tools/lldb/source/Plugins/Language/CPlusPlus/CMakeFiles/lldbPluginCPlusPlusLanguage.dir/BlockPointer.cpp.o
633.144 [118/20/7148] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSDictionary.cpp.o
633.401 [118/19/7149] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCRuntimeV2.cpp.o
633.692 [118/18/7150] Building CXX object tools/lldb/source/Plugins/SymbolFile/CTF/CMakeFiles/lldbPluginSymbolFileCTF.dir/SymbolFileCTF.cpp.o
634.067 [118/17/7151] 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:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<clang::IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:73:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const clang::IdentifierLoc &' for 1st argument
    /*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)
                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:118:28: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::initializer_list<IdentifierLoc>' for 1st argument
    constexpr /*implicit*/ ArrayRef(
                           ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:91:18: note: candidate template ignored: could not match 'SmallVectorTemplateCommon' against 'pair'
    /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:97:18: note: candidate template ignored: could not match 'vector' against 'pair'
    /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:102:28: note: candidate template ignored: could not match 'array' against 'pair'
    /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
                           ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:107:28: note: candidate template ignored: could not match 'const clang::IdentifierLoc [N]' against 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>'
    /*implicit*/ constexpr ArrayRef(const T (&Arr LLVM_LIFETIME_BOUND)[N])
                           ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:129:5: note: candidate template ignored: could not match 'ArrayRef' against 'pair'
    ArrayRef(const ArrayRef<U *> &A,
    ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:138:18: note: candidate template ignored: could not match 'SmallVectorTemplateCommon' against 'pair'
    /*implicit*/ ArrayRef(
                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:147:5: note: candidate template ignored: could not match 'vector' against 'pair'
    ArrayRef(const std::vector<U *, A> &Vec,
    ^

swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Apr 17, 2025
…e data structures to `IdentifierLoc`" (llvm#135974)

Reverts llvm#135808

Example from the LLDB macOS CI:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/24084/execution/node/54/log/?consoleFull
```
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
```

(cherry picked from commit 99c08ff)

Conflicts:
	clang/lib/Parse/ParseDecl.cpp
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
…tructures to `IdentifierLoc` (llvm#135808)

I found this issue when I working on
llvm#107168.

Currently we have many similiar data structures like:
 - `std::pair<IdentifierInfo *, SourceLocation>`.
 - Element type of `ModuleIdPath`.
 - `IdentifierLocPair`.
 - `IdentifierLoc`.
 
This PR unify these data structures to `IdentifierLoc`, moved
`IdentifierLoc` definition to SourceLocation.h, and deleted other
similer data structures.

---------

Signed-off-by: yronglin <[email protected]>
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
…e data structures to `IdentifierLoc`" (llvm#135974)

Reverts llvm#135808

Example from the LLDB macOS CI:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/24084/execution/node/54/log/?consoleFull
```
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:360:49: error: no viable conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'clang::ModuleIdPath' (aka 'ArrayRef<IdentifierLoc>')
  clang::Module *top_level_module = DoGetModule(clang_path.front(), false);
                                                ^~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'const llvm::ArrayRef<clang::IdentifierLoc> &' for 1st argument
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:41:40: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'llvm::ArrayRef<clang::IdentifierLoc> &&' for 1st argument
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: candidate constructor not viable: no known conversion from 'std::pair<clang::IdentifierInfo *, clang::SourceLocation>' to 'std::nullopt_t' for 1st argument
    /*implicit*/ ArrayRef(std::nullopt_t) {}
```
yronglin added a commit that referenced this pull request Apr 17, 2025
… data structures to `IdentifierLoc` (#136077)

This PR reland #135808, fixed
some missed changes in LLDB.
I found this issue when I working on
#107168.

Currently we have many similiar data structures like:
- std::pair<IdentifierInfo *, SourceLocation>.
- Element type of ModuleIdPath.
- IdentifierLocPair.
- IdentifierLoc.

This PR unify these data structures to IdentifierLoc, moved
IdentifierLoc definition to SourceLocation.h, and deleted other similer
data structures.

---------

Signed-off-by: yronglin <[email protected]>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 17, 2025
…` pair-like data structures to `IdentifierLoc` (#136077)

This PR reland llvm/llvm-project#135808, fixed
some missed changes in LLDB.
I found this issue when I working on
llvm/llvm-project#107168.

Currently we have many similiar data structures like:
- std::pair<IdentifierInfo *, SourceLocation>.
- Element type of ModuleIdPath.
- IdentifierLocPair.
- IdentifierLoc.

This PR unify these data structures to IdentifierLoc, moved
IdentifierLoc definition to SourceLocation.h, and deleted other similer
data structures.

---------

Signed-off-by: yronglin <[email protected]>
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
… data structures to `IdentifierLoc` (llvm#136077)

This PR reland llvm#135808, fixed
some missed changes in LLDB.
I found this issue when I working on
llvm#107168.

Currently we have many similiar data structures like:
- std::pair<IdentifierInfo *, SourceLocation>.
- Element type of ModuleIdPath.
- IdentifierLocPair.
- IdentifierLoc.

This PR unify these data structures to IdentifierLoc, moved
IdentifierLoc definition to SourceLocation.h, and deleted other similer
data structures.

---------

Signed-off-by: yronglin <[email protected]>
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
… data structures to `IdentifierLoc` (llvm#136077)

This PR reland llvm#135808, fixed
some missed changes in LLDB.
I found this issue when I working on
llvm#107168.

Currently we have many similiar data structures like:
- std::pair<IdentifierInfo *, SourceLocation>.
- Element type of ModuleIdPath.
- IdentifierLocPair.
- IdentifierLoc.

This PR unify these data structures to IdentifierLoc, moved
IdentifierLoc definition to SourceLocation.h, and deleted other similer
data structures.

---------

Signed-off-by: yronglin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 backend:ARM clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category clang-tools-extra HLSL HLSL Language Support
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

7 participants