Skip to content
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

[clangd] Support outgoing calls in call hierarchy #77556

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

HighCommander4
Copy link
Collaborator

No description provided.

@llvmbot llvmbot added the clangd label Jan 10, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 10, 2024

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clangd

Author: Nathan Ridge (HighCommander4)

Changes

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

23 Files Affected:

  • (modified) clang-tools-extra/clangd/ClangdLSPServer.cpp (+7)
  • (modified) clang-tools-extra/clangd/ClangdLSPServer.h (+3)
  • (modified) clang-tools-extra/clangd/ClangdServer.cpp (+9)
  • (modified) clang-tools-extra/clangd/ClangdServer.h (+4)
  • (modified) clang-tools-extra/clangd/XRefs.cpp (+59)
  • (modified) clang-tools-extra/clangd/XRefs.h (+3)
  • (modified) clang-tools-extra/clangd/index/Index.cpp (+5)
  • (modified) clang-tools-extra/clangd/index/Index.h (+35)
  • (modified) clang-tools-extra/clangd/index/MemIndex.cpp (+20)
  • (modified) clang-tools-extra/clangd/index/MemIndex.h (+4)
  • (modified) clang-tools-extra/clangd/index/Merge.cpp (+34)
  • (modified) clang-tools-extra/clangd/index/Merge.h (+3)
  • (modified) clang-tools-extra/clangd/index/ProjectAware.cpp (+13)
  • (modified) clang-tools-extra/clangd/index/Ref.h (+3)
  • (modified) clang-tools-extra/clangd/index/SymbolCollector.cpp (+17-3)
  • (modified) clang-tools-extra/clangd/index/SymbolCollector.h (+1)
  • (modified) clang-tools-extra/clangd/index/dex/Dex.cpp (+42)
  • (modified) clang-tools-extra/clangd/index/dex/Dex.h (+20)
  • (modified) clang-tools-extra/clangd/test/type-hierarchy-ext.test (+2)
  • (modified) clang-tools-extra/clangd/test/type-hierarchy.test (+1-50)
  • (modified) clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp (+201-70)
  • (modified) clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp (+6)
  • (modified) clang-tools-extra/clangd/unittests/RenameTests.cpp (+12)
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index a87da252b7a7e9..482dae521fbcd5 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -1373,6 +1373,12 @@ void ClangdLSPServer::onInlayHint(const InlayHintsParams &Params,
                      std::move(Reply));
 }
 
+void ClangdLSPServer::onCallHierarchyOutgoingCalls(
+    const CallHierarchyOutgoingCallsParams &Params,
+    Callback<std::vector<CallHierarchyOutgoingCall>> Reply) {
+  Server->outgoingCalls(Params.item, std::move(Reply));
+}
+
 void ClangdLSPServer::applyConfiguration(
     const ConfigurationSettings &Settings) {
   // Per-file update to the compilation database.
@@ -1654,6 +1660,7 @@ void ClangdLSPServer::bindMethods(LSPBinder &Bind,
   Bind.method("typeHierarchy/subtypes", this, &ClangdLSPServer::onSubTypes);
   Bind.method("textDocument/prepareCallHierarchy", this, &ClangdLSPServer::onPrepareCallHierarchy);
   Bind.method("callHierarchy/incomingCalls", this, &ClangdLSPServer::onCallHierarchyIncomingCalls);
+  Bind.method("callHierarchy/outgoingCalls", this, &ClangdLSPServer::onCallHierarchyOutgoingCalls);
   Bind.method("textDocument/selectionRange", this, &ClangdLSPServer::onSelectionRange);
   Bind.method("textDocument/documentLink", this, &ClangdLSPServer::onDocumentLink);
   Bind.method("textDocument/semanticTokens/full", this, &ClangdLSPServer::onSemanticTokens);
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h
index 79579c22b788a9..50a0a7e43a4436 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.h
+++ b/clang-tools-extra/clangd/ClangdLSPServer.h
@@ -153,6 +153,9 @@ class ClangdLSPServer : private ClangdServer::Callbacks,
   void onCallHierarchyIncomingCalls(
       const CallHierarchyIncomingCallsParams &,
       Callback<std::vector<CallHierarchyIncomingCall>>);
+  void onCallHierarchyOutgoingCalls(
+      const CallHierarchyOutgoingCallsParams &,
+      Callback<std::vector<CallHierarchyOutgoingCall>>);
   void onClangdInlayHints(const InlayHintsParams &,
                           Callback<llvm::json::Value>);
   void onInlayHint(const InlayHintsParams &, Callback<std::vector<InlayHint>>);
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index 6fb2641e8793db..5c0303c9bf9448 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -880,6 +880,15 @@ void ClangdServer::inlayHints(PathRef File, std::optional<Range> RestrictRange,
   WorkScheduler->runWithAST("InlayHints", File, std::move(Action), Transient);
 }
 
+void ClangdServer::outgoingCalls(
+    const CallHierarchyItem &Item,
+    Callback<std::vector<CallHierarchyOutgoingCall>> CB) {
+  WorkScheduler->run("Outgoing Calls", "",
+                     [CB = std::move(CB), Item, this]() mutable {
+                       CB(clangd::outgoingCalls(Item, Index));
+                     });
+}
+
 void ClangdServer::onFileEvent(const DidChangeWatchedFilesParams &Params) {
   // FIXME: Do nothing for now. This will be used for indexing and potentially
   // invalidating other caches.
diff --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h
index a416602251428b..3319c44e75d3fc 100644
--- a/clang-tools-extra/clangd/ClangdServer.h
+++ b/clang-tools-extra/clangd/ClangdServer.h
@@ -288,6 +288,10 @@ class ClangdServer {
   void incomingCalls(const CallHierarchyItem &Item,
                      Callback<std::vector<CallHierarchyIncomingCall>>);
 
+  /// Resolve outgoing calls for a given call hierarchy item.
+  void outgoingCalls(const CallHierarchyItem &Item,
+                     Callback<std::vector<CallHierarchyOutgoingCall>>);
+
   /// Resolve inlay hints for a given document.
   void inlayHints(PathRef File, std::optional<Range> RestrictRange,
                   Callback<std::vector<InlayHint>>);
diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp
index 5f41f788a69393..8095a36b7fb4ec 100644
--- a/clang-tools-extra/clangd/XRefs.cpp
+++ b/clang-tools-extra/clangd/XRefs.cpp
@@ -1700,6 +1700,7 @@ declToHierarchyItem(const NamedDecl &ND, llvm::StringRef TUPath) {
 
   HierarchyItem HI;
   HI.name = printName(Ctx, ND);
+  // FIXME: Populate HI.detail the way we do in symbolToHierarchyItem?
   HI.kind = SK;
   HI.range = Range{sourceLocToPosition(SM, DeclRange->getBegin()),
                    sourceLocToPosition(SM, DeclRange->getEnd())};
@@ -1751,6 +1752,7 @@ static std::optional<HierarchyItem> symbolToHierarchyItem(const Symbol &S,
   }
   HierarchyItem HI;
   HI.name = std::string(S.Name);
+  HI.detail = (S.Scope + S.Name).str();
   HI.kind = indexSymbolKindToSymbolKind(S.SymInfo.Kind);
   HI.selectionRange = Loc->range;
   // FIXME: Populate 'range' correctly
@@ -2303,6 +2305,63 @@ incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) {
   return Results;
 }
 
+std::vector<CallHierarchyOutgoingCall>
+outgoingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) {
+  std::vector<CallHierarchyOutgoingCall> Results;
+  if (!Index || Item.data.empty())
+    return Results;
+  auto ID = SymbolID::fromStr(Item.data);
+  if (!ID) {
+    elog("outgoingCalls failed to find symbol: {0}", ID.takeError());
+    return Results;
+  }
+  // In this function, we find outgoing calls based on the index only.
+  ContainedRefsRequest Request;
+  Request.ID = *ID;
+  // Initially store the ranges in a map keyed by SymbolID of the callee.
+  // This allows us to group different calls to the same function
+  // into the same CallHierarchyOutgoingCall.
+  llvm::DenseMap<SymbolID, std::vector<Range>> CallsOut;
+  // We can populate the ranges based on a refs request only. As we do so, we
+  // also accumulate the callee IDs into a lookup request.
+  LookupRequest CallsOutLookup;
+  Index->containedRefs(Request, [&](const auto &R) {
+    auto Loc = indexToLSPLocation(R.Location, Item.uri.file());
+    if (!Loc) {
+      elog("outgoingCalls failed to convert location: {0}", Loc.takeError());
+      return;
+    }
+    auto It = CallsOut.try_emplace(R.Symbol, std::vector<Range>{}).first;
+    It->second.push_back(Loc->range);
+
+    CallsOutLookup.IDs.insert(R.Symbol);
+  });
+  // Perform the lookup request and combine its results with CallsOut to
+  // get complete CallHierarchyOutgoingCall objects.
+  Index->lookup(CallsOutLookup, [&](const Symbol &Callee) {
+    // Filter references to only keep function calls
+    using SK = index::SymbolKind;
+    auto Kind = Callee.SymInfo.Kind;
+    bool NotCall = (Kind != SK::Function && Kind != SK::InstanceMethod &&
+                    Kind != SK::ClassMethod && Kind != SK::StaticMethod &&
+                    Kind != SK::Constructor && Kind != SK::Destructor &&
+                    Kind != SK::ConversionFunction);
+    assert(!NotCall);
+
+    auto It = CallsOut.find(Callee.ID);
+    assert(It != CallsOut.end());
+    if (auto CHI = symbolToCallHierarchyItem(Callee, Item.uri.file()))
+      Results.push_back(
+          CallHierarchyOutgoingCall{std::move(*CHI), std::move(It->second)});
+  });
+  // Sort results by name of the callee.
+  llvm::sort(Results, [](const CallHierarchyOutgoingCall &A,
+                         const CallHierarchyOutgoingCall &B) {
+    return A.to.name < B.to.name;
+  });
+  return Results;
+}
+
 llvm::DenseSet<const Decl *> getNonLocalDeclRefs(ParsedAST &AST,
                                                  const FunctionDecl *FD) {
   if (!FD->hasBody())
diff --git a/clang-tools-extra/clangd/XRefs.h b/clang-tools-extra/clangd/XRefs.h
index df91dd15303c18..247e52314c3f94 100644
--- a/clang-tools-extra/clangd/XRefs.h
+++ b/clang-tools-extra/clangd/XRefs.h
@@ -150,6 +150,9 @@ prepareCallHierarchy(ParsedAST &AST, Position Pos, PathRef TUPath);
 std::vector<CallHierarchyIncomingCall>
 incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index);
 
+std::vector<CallHierarchyOutgoingCall>
+outgoingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index);
+
 /// Returns all decls that are referenced in the \p FD except local symbols.
 llvm::DenseSet<const Decl *> getNonLocalDeclRefs(ParsedAST &AST,
                                                  const FunctionDecl *FD);
diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp
index 7a0c23287db225..86dc6ed7633449 100644
--- a/clang-tools-extra/clangd/index/Index.cpp
+++ b/clang-tools-extra/clangd/index/Index.cpp
@@ -66,6 +66,11 @@ bool SwapIndex::refs(const RefsRequest &R,
                      llvm::function_ref<void(const Ref &)> CB) const {
   return snapshot()->refs(R, CB);
 }
+bool SwapIndex::containedRefs(
+    const ContainedRefsRequest &R,
+    llvm::function_ref<void(const ContainedRefsResult &)> CB) const {
+  return snapshot()->containedRefs(R, CB);
+}
 void SwapIndex::relations(
     const RelationsRequest &R,
     llvm::function_ref<void(const SymbolID &, const Symbol &)> CB) const {
diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h
index 047ce08e93e3ab..a193b1a191216a 100644
--- a/clang-tools-extra/clangd/index/Index.h
+++ b/clang-tools-extra/clangd/index/Index.h
@@ -77,6 +77,19 @@ struct RefsRequest {
   bool WantContainer = false;
 };
 
+struct ContainedRefsRequest {
+  /// Note that RefKind::Call just restricts the matched SymbolKind to
+  /// functions, not the form of the reference (e.g. address-of-function,
+  /// which can indicate an indirect call, should still be caught).
+  static const RefKind SupportedRefKinds = RefKind::Call;
+
+  SymbolID ID;
+  /// If set, limit the number of refers returned from the index. The index may
+  /// choose to return less than this, e.g. it tries to avoid returning stale
+  /// results.
+  std::optional<uint32_t> Limit;
+};
+
 struct RelationsRequest {
   llvm::DenseSet<SymbolID> Subjects;
   RelationKind Predicate;
@@ -84,6 +97,14 @@ struct RelationsRequest {
   std::optional<uint32_t> Limit;
 };
 
+struct ContainedRefsResult {
+  /// The source location where the symbol is named.
+  SymbolLocation Location;
+  RefKind Kind = RefKind::Unknown;
+  /// The ID of the symbol which is referred to
+  SymbolID Symbol;
+};
+
 /// Describes what data is covered by an index.
 ///
 /// Indexes may contain symbols but not references from a file, etc.
@@ -141,6 +162,17 @@ class SymbolIndex {
   virtual bool refs(const RefsRequest &Req,
                     llvm::function_ref<void(const Ref &)> Callback) const = 0;
 
+  /// Find all symbols that are referenced by a symbol and apply
+  /// \p Callback on each result.
+  ///
+  /// Results should be returned in arbitrary order.
+  /// The returned result must be deep-copied if it's used outside Callback.
+  ///
+  /// Returns true if there will be more results (limited by Req.Limit);
+  virtual bool containedRefs(
+      const ContainedRefsRequest &Req,
+      llvm::function_ref<void(const ContainedRefsResult &)> Callback) const = 0;
+
   /// Finds all relations (S, P, O) stored in the index such that S is among
   /// Req.Subjects and P is Req.Predicate, and invokes \p Callback for (S, O) in
   /// each.
@@ -175,6 +207,9 @@ class SwapIndex : public SymbolIndex {
               llvm::function_ref<void(const Symbol &)>) const override;
   bool refs(const RefsRequest &,
             llvm::function_ref<void(const Ref &)>) const override;
+  bool containedRefs(
+      const ContainedRefsRequest &,
+      llvm::function_ref<void(const ContainedRefsResult &)>) const override;
   void relations(const RelationsRequest &,
                  llvm::function_ref<void(const SymbolID &, const Symbol &)>)
       const override;
diff --git a/clang-tools-extra/clangd/index/MemIndex.cpp b/clang-tools-extra/clangd/index/MemIndex.cpp
index fe0ee873018b37..ff966529ae188a 100644
--- a/clang-tools-extra/clangd/index/MemIndex.cpp
+++ b/clang-tools-extra/clangd/index/MemIndex.cpp
@@ -9,6 +9,7 @@
 #include "MemIndex.h"
 #include "FuzzyMatch.h"
 #include "Quality.h"
+#include "index/Index.h"
 #include "support/Trace.h"
 
 namespace clang {
@@ -85,6 +86,25 @@ bool MemIndex::refs(const RefsRequest &Req,
   return false; // We reported all refs.
 }
 
+bool MemIndex::containedRefs(
+    const ContainedRefsRequest &Req,
+    llvm::function_ref<void(const ContainedRefsResult &)> Callback) const {
+  trace::Span Tracer("MemIndex refersTo");
+  uint32_t Remaining = Req.Limit.value_or(std::numeric_limits<uint32_t>::max());
+  for (const auto &Pair : Refs) {
+    for (const auto &R : Pair.second) {
+      if (!static_cast<int>(ContainedRefsRequest::SupportedRefKinds & R.Kind) ||
+          Req.ID != R.Container)
+        continue;
+      if (Remaining == 0)
+        return true; // More refs were available.
+      --Remaining;
+      Callback({R.Location, R.Kind, Pair.first});
+    }
+  }
+  return false; // We reported all refs.
+}
+
 void MemIndex::relations(
     const RelationsRequest &Req,
     llvm::function_ref<void(const SymbolID &, const Symbol &)> Callback) const {
diff --git a/clang-tools-extra/clangd/index/MemIndex.h b/clang-tools-extra/clangd/index/MemIndex.h
index fba2c1a7120a2b..8f390c5028dc4d 100644
--- a/clang-tools-extra/clangd/index/MemIndex.h
+++ b/clang-tools-extra/clangd/index/MemIndex.h
@@ -72,6 +72,10 @@ class MemIndex : public SymbolIndex {
   bool refs(const RefsRequest &Req,
             llvm::function_ref<void(const Ref &)> Callback) const override;
 
+  bool containedRefs(const ContainedRefsRequest &Req,
+                     llvm::function_ref<void(const ContainedRefsResult &)>
+                         Callback) const override;
+
   void relations(const RelationsRequest &Req,
                  llvm::function_ref<void(const SymbolID &, const Symbol &)>
                      Callback) const override;
diff --git a/clang-tools-extra/clangd/index/Merge.cpp b/clang-tools-extra/clangd/index/Merge.cpp
index 8221d4b1f44405..aecca38a885b66 100644
--- a/clang-tools-extra/clangd/index/Merge.cpp
+++ b/clang-tools-extra/clangd/index/Merge.cpp
@@ -155,6 +155,40 @@ bool MergedIndex::refs(const RefsRequest &Req,
   return More || StaticHadMore;
 }
 
+bool MergedIndex::containedRefs(
+    const ContainedRefsRequest &Req,
+    llvm::function_ref<void(const ContainedRefsResult &)> Callback) const {
+  trace::Span Tracer("MergedIndex refersTo");
+  bool More = false;
+  uint32_t Remaining = Req.Limit.value_or(std::numeric_limits<uint32_t>::max());
+  // We don't want duplicated refs from the static/dynamic indexes,
+  // and we can't reliably deduplicate them because offsets may differ slightly.
+  // We consider the dynamic index authoritative and report all its refs,
+  // and only report static index refs from other files.
+  More |= Dynamic->containedRefs(Req, [&](const auto &O) {
+    Callback(O);
+    assert(Remaining != 0);
+    --Remaining;
+  });
+  if (Remaining == 0 && More)
+    return More;
+  auto DynamicContainsFile = Dynamic->indexedFiles();
+  // We return less than Req.Limit if static index returns more refs for dirty
+  // files.
+  bool StaticHadMore = Static->containedRefs(Req, [&](const auto &O) {
+    if ((DynamicContainsFile(O.Location.FileURI) & IndexContents::References) !=
+        IndexContents::None)
+      return; // ignore refs that have been seen from dynamic index.
+    if (Remaining == 0) {
+      More = true;
+      return;
+    }
+    --Remaining;
+    Callback(O);
+  });
+  return More || StaticHadMore;
+}
+
 llvm::unique_function<IndexContents(llvm::StringRef) const>
 MergedIndex::indexedFiles() const {
   return [DynamicContainsFile{Dynamic->indexedFiles()},
diff --git a/clang-tools-extra/clangd/index/Merge.h b/clang-tools-extra/clangd/index/Merge.h
index b8a562b0df5d92..7441be6e57e854 100644
--- a/clang-tools-extra/clangd/index/Merge.h
+++ b/clang-tools-extra/clangd/index/Merge.h
@@ -38,6 +38,9 @@ class MergedIndex : public SymbolIndex {
               llvm::function_ref<void(const Symbol &)>) const override;
   bool refs(const RefsRequest &,
             llvm::function_ref<void(const Ref &)>) const override;
+  bool containedRefs(
+      const ContainedRefsRequest &,
+      llvm::function_ref<void(const ContainedRefsResult &)>) const override;
   void relations(const RelationsRequest &,
                  llvm::function_ref<void(const SymbolID &, const Symbol &)>)
       const override;
diff --git a/clang-tools-extra/clangd/index/ProjectAware.cpp b/clang-tools-extra/clangd/index/ProjectAware.cpp
index 2c6f8273b35d0e..9836f0130362a0 100644
--- a/clang-tools-extra/clangd/index/ProjectAware.cpp
+++ b/clang-tools-extra/clangd/index/ProjectAware.cpp
@@ -35,6 +35,10 @@ class ProjectAwareIndex : public SymbolIndex {
   /// Query all indexes while prioritizing the associated one (if any).
   bool refs(const RefsRequest &Req,
             llvm::function_ref<void(const Ref &)> Callback) const override;
+  /// Query all indexes while prioritizing the associated one (if any).
+  bool containedRefs(const ContainedRefsRequest &Req,
+                     llvm::function_ref<void(const ContainedRefsResult &)>
+                         Callback) const override;
 
   /// Queries only the associates index when Req.RestrictForCodeCompletion is
   /// set, otherwise queries all.
@@ -94,6 +98,15 @@ bool ProjectAwareIndex::refs(
   return false;
 }
 
+bool ProjectAwareIndex::containedRefs(
+    const ContainedRefsRequest &Req,
+    llvm::function_ref<void(const ContainedRefsResult &)> Callback) const {
+  trace::Span Tracer("ProjectAwareIndex::refersTo");
+  if (auto *Idx = getIndex())
+    return Idx->containedRefs(Req, Callback);
+  return false;
+}
+
 bool ProjectAwareIndex::fuzzyFind(
     const FuzzyFindRequest &Req,
     llvm::function_ref<void(const Symbol &)> Callback) const {
diff --git a/clang-tools-extra/clangd/index/Ref.h b/clang-tools-extra/clangd/index/Ref.h
index 6e383e2ade3d25..870f77f56e6cb3 100644
--- a/clang-tools-extra/clangd/index/Ref.h
+++ b/clang-tools-extra/clangd/index/Ref.h
@@ -63,6 +63,9 @@ enum class RefKind : uint8_t {
   //   ^ this references Foo, but does not explicitly spell out its name
   // };
   Spelled = 1 << 3,
+  // A reference which is a call. Used as a filter for which references
+  // to store in data structures used for computing outgoing calls.
+  Call = 1 << 4,
   All = Declaration | Definition | Reference | Spelled,
 };
 
diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp
index bf838e53f2a21e..a1e9afebab0654 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -18,6 +18,7 @@
 #include "clang-include-cleaner/Record.h"
 #include "clang-include-cleaner/Types.h"
 #include "index/CanonicalIncludes.h"
+#include "index/Ref.h"
 #include "index/Relation.h"
 #include "index/Symbol.h"
 #include "index/SymbolID.h"
@@ -612,7 +613,7 @@ bool SymbolCollector::handleDeclOccurrence(
     auto FileLoc = SM.getFileLoc(Loc);
     auto FID = SM.getFileID(FileLoc);
     if (Opts.RefsInHeaders || FID == SM.getMainFileID()) {
-      addRef(ID, SymbolRef{FileLoc, FID, Roles,
+      addRef(ID, SymbolRef{FileLoc, FID, Roles, index::getSymbolInfo(ND).Kind,
                            getRefContainer(ASTNode.Parent, Opts),
                            isSpelled(FileLoc, *ND)});
     }
@@ -722,8 +723,10 @@ bool SymbolCollector::handleMacroOccurrence(const IdentifierInfo *Name,
     // FIXME: Populate container information for macro references.
     // FIXME: All MacroRefs are marked as Spelled now, but this should be
     // checked.
-    addRef(ID, SymbolRef{Loc, SM.getFileID(Loc), Roles, /*Container=*/nullptr,
-                         /*Spelled=*/true});
+    addRef(ID,
+           SymbolRef{Loc, SM.getFileID(Loc), Roles, index::SymbolKind::Macro,
+                     /*Container=*/nullptr,
+                     /*Spelled=*/true});
   }
 
   // Collect symbols.
@@ -1081,6 +1084,14 @@ bool SymbolCollector::shouldIndexFile(FileID FID) {
   return I.first->second;
 }
 
+static bool refIsCall(index::SymbolKind Kind) {
+  using SK = index::SymbolKind;
+  return Kind == SK::Function || Kind == SK::InstanceMethod ||
+         Kind == SK::ClassMethod || Kind == SK::StaticMethod ||
+         Kind == SK::Constructor || Kind == SK::Destructor ||
+         Kind == SK::ConversionFunction;
+}
+
...
[truncated]

@HighCommander4
Copy link
Collaborator Author

(Not sure what happened here, the PR was somehow created while I was still writing the description. Anyways, updating the title now.)

@HighCommander4 HighCommander4 changed the title lsOutgoing calls [clangd] Support outgoing calls in call hierarchy Jan 10, 2024
@HighCommander4
Copy link
Collaborator Author

Since Phabricator has been taken down, I'm resubmitting the patch implementing outgoing calls in call hierarchy that was previously posted at https://reviews.llvm.org/D93829.

Previous discussion can still be seen at the Phabricator link which now links to a static snapshot of the review.

@HighCommander4
Copy link
Collaborator Author

@sam-mccall review ping :)

I would particularly appreciate feedback on whether I should plan to set aside some time to implement the "deep lookup optimization" (from this comment), or whether the 2.5% increase in index memory usage (which I've achieved by implementing everything except the deep lookup optimization from that comment) is acceptable.

@HighCommander4
Copy link
Collaborator Author

@sam-mccall review ping :)

@pidgeon777
Copy link

@sam-mccall also pinging to assist @HighCommander4 🙂

@HighCommander4
Copy link
Collaborator Author

Shopping around for some potential alternative reviewers :)

@pidgeon777
Copy link

I was thinking that it's a real pity this branch is so hard to get merged 😅 I think other than the review it would be 100% done? I mean, no big further modifications would be involved?

@HighCommander4
Copy link
Collaborator Author

I think other than the review it would be 100% done? I mean, no big further modifications would be involved?

In terms of functionality, I'd say the patch is complete.

In terms of performance (and specifically memory usage), it's a matter of judgment of what we consider good enough. The current patch increases the memory usage of the index by 2.5% on the example workload of the LLVM codebase. That's not too bad (and a definite improvement over the 8.2% increase for the original version of the patch), but there is a possibility of doing a more involved rework of the index's in-memory representation (discussed under the name "deep lookup optimization" in the Phabricator thread) which would actually result in a net decrease in memory usage even with the feature.

One of the key pieces of feedback I'm hoping to get on this patch is whether the 2.5% memory usage increase is acceptable, or if we should consider the deep lookup optimization as a prerequisite.

@HighCommander4
Copy link
Collaborator Author

HighCommander4 commented Sep 4, 2024

@kadircet perhaps you might be able to pick up this review?

Or, in the absence of a full review, your opinion on the directional question in this comment would be appreciated as well:

how would you feel about proceeding with the patch in its current state, with the memory usage increase brought down from 8.2% to 2.5% thanks to the combination of the simple lookup optimization + RefKind filtering, and leaving the "deep lookup optimization" to be explored in a future change?

@pidgeon777
Copy link

Hopefully we're closer and closer to a merge, this really is a missing feature. I think this is the only LSP provider supporting just only one of the callHierarchy methods.

@HighCommander4
Copy link
Collaborator Author

@ckandeler, perhaps you would be willing to review this patch? I don't seem to have gotten any traction from my usual reviewers over the course of the past year.

@@ -1751,6 +1752,7 @@ static std::optional<HierarchyItem> symbolToHierarchyItem(const Symbol &S,
}
HierarchyItem HI;
HI.name = std::string(S.Name);
HI.detail = (S.Scope + S.Name).str();

Choose a reason for hiding this comment

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

adding signature looks a bit more helpful, maybe one day add return type info too

Suggested change
HI.detail = (S.Scope + S.Name).str();
HI.detail = (S.Scope + S.Name + S.Signature).str();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, showing the signature here would be quite useful.

I actually started implementing this for incoming calls in clangd/clangd#915, but ran into a complication (our current indexing process doesn't actually store the signature for all functions).

This is solvable with some indexer changes, but I'll defer to a fix for that issue, which will now (once this patch is merged) benefit both incoming and outgoing calls.

@@ -1700,6 +1700,7 @@ declToHierarchyItem(const NamedDecl &ND, llvm::StringRef TUPath) {

HierarchyItem HI;
HI.name = printName(Ctx, ND);
// FIXME: Populate HI.detail the way we do in symbolToHierarchyItem?

Choose a reason for hiding this comment

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

is this the place which covers c++ constructors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The difference between declToHierarchyItem and symbolToHierarchyItem is the former is used for symbols from the AST, and the latter for symbols from the index. They should both ideally produce the same result, but the implementation (and sometimes the amount of detail available in the respective inputs) is different.

Copy link

@i-garrison i-garrison Nov 25, 2024

Choose a reason for hiding this comment

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

I see. Ideally there should be some recommended use model for c++ which call hierarchy clients/visualisers (e.g. lsp4e) could implement to show expected function signatures. Like "obtain details field from call hierarchy item and use it as function signature" and then lsp4e could append details to name. We probably can later tune xrefs.cpp implementation to provide required details where needed.

Note that function return value is still not available, and as far as I can see there is no place in protocol to put it in. I would envision language-specific details map for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See also clangd/clangd#1940 for some additional discussion of this topic.

qchateau and others added 5 commits November 25, 2024 02:34
The implementation is very close the the incoming
calls implementation. The results of the outgoing
calls are expected to be the exact symmetry of the
incoming calls.

Differential Revision: https://reviews.llvm.org/D93829
@HighCommander4
Copy link
Collaborator Author

Rebased.

@HighCommander4
Copy link
Collaborator Author

Thanks @ckandeler for the review! I addressed the comments in bad4f72.

Copy link
Member

@ckandeler ckandeler left a comment

Choose a reason for hiding this comment

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

Appears to work fine.
Regarding the slight memory increase: If anyone feels strongly about it, they had plenty of time to chime in.

@pidgeon777
Copy link

First of all, I want to express my gratitude to all contributors working on the integration of changes and tests.

In today's development landscape, especially when working with AI-assisted coding, providing the best possible code context is crucial. The integration of outgoing calls functionality can significantly improve this aspect.

The main benefit of implementing outgoing calls would be context extension. This feature would:

  • Allow developers to see function call relationships
  • Help identify potential impacts when modifying functions
  • Provide better context for AI-assisted development
  • Improve code maintenance and refactoring workflows

When modifying a function, developers would have immediate visibility of all called functions that might need corresponding updates, reducing the risk of introducing bugs.

@HighCommander4
Copy link
Collaborator Author

Appears to work fine. Regarding the slight memory increase: If anyone feels strongly about it, they had plenty of time to chime in.

Thanks! I'll go ahead and merge.

@HighCommander4 HighCommander4 merged commit ca184cf into llvm:main Nov 26, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-5 while building clang-tools-extra at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
105.762 [1614/8/4327] Linking CXX static library lib/libclangdMain.a
106.311 [1613/8/4328] Linking CXX executable bin/clangd-indexer
106.716 [1612/8/4329] Linking CXX executable bin/clangd
106.732 [1611/8/4330] Building CXX object tools/clang/tools/extra/clangd/xpc/framework/CMakeFiles/ClangdXPCLib.dir/ClangdXPC.cpp.o
106.883 [1610/8/4331] Linking CXX shared library lib/libClangdXPCLib.dylib
107.007 [1609/8/4332] Creating ClangdXPC framework
107.038 [1608/8/4333] Building CXX object tools/clang/tools/extra/clangd/xpc/test-client/CMakeFiles/clangd-xpc-test-client.dir/ClangdXPCTestClient.cpp.o
107.385 [1607/8/4334] Linking CXX executable bin/clangd-xpc-test-client
107.878 [1606/8/4335] Building CXX object tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o
109.071 [1605/8/4336] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /opt/homebrew/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/tools/extra/clangd/unittests -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/unittests -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/tools/extra/clangd/../clang-tidy -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/include -I/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/include -I/Users/buildbot/buildbot-root/aarch64-darwin/build/include -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/include -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd -I/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/tools/extra/clangd -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/third-party/unittest/googletest/include -I/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/third-party/unittest/googlemock/include -isystem /opt/homebrew/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
                                fromRanges(Source.range("Callee")))));
                                ^
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
                                fromRanges(Source.range("Callee")))));
                                ^
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
              ElementsAre(AllOf(from(withName("caller")), fromRanges())));
                                                          ^
3 errors generated.
109.374 [1605/7/4337] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
109.603 [1605/6/4338] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
112.199 [1605/5/4339] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
112.446 [1605/4/4340] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
113.441 [1605/3/4341] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/BackgroundIndexTests.cpp.o
114.042 [1605/2/4342] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdTests.cpp.o
119.879 [1605/1/4343] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompleteTests.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang-tools-extra at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
[1/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestIndex.cpp.o
[2/156] Linking CXX executable tools/clang/tools/extra/unittests/clang-change-namespace/ClangChangeNamespaceTests
[3/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ProjectAwareIndexTests.cpp.o
[4/156] Linking CXX executable tools/clang/tools/extra/include-cleaner/unittests/ClangIncludeCleanerTests
[5/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
[6/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -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/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googlemock/include -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[7/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[8/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrerequisiteModulesTest.cpp.o
[9/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompilerTests.cpp.o
[10/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
[11/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ExpectedTypeTest.cpp.o
[12/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InsertionPointTests.cpp.o
[13/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[14/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/QualityTests.cpp.o
[15/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticHighlightingTests.cpp.o
[16/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SymbolInfoTests.cpp.o
[17/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SyncAPI.cpp.o
[18/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[19/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SelectionTests.cpp.o
[20/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeaderSourceSwitchTests.cpp.o
[21/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
[22/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SerializationTests.cpp.o
[23/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/StdLibTests.cpp.o
[24/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FindTargetTests.cpp.o
[25/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexActionTests.cpp.o
[26/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[27/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IncludeCleanerTests.cpp.o
[28/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o
[29/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SourceCodeTests.cpp.o
[30/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
[31/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/RenameTests.cpp.o
[32/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InlayHintTests.cpp.o
[33/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexTests.cpp.o
[34/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HoverTests.cpp.o
[35/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PreambleTests.cpp.o
[36/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdTests.cpp.o
[37/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FileIndexTests.cpp.o
[38/156] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/BackgroundIndexTests.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clangd-ubuntu-tsan running on clangd-ubuntu-clang while building clang-tools-extra at step 5 "build-clangd-clangd-index-server-clangd-indexer".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-clangd-clangd-index-server-clangd-indexer) failure: build (failure)
...
130.085 [98/18/4531] Linking CXX static library lib/libclangTidyLLVMLibcModule.a
130.253 [97/18/4532] Linking CXX static library lib/libclangTidyZirconModule.a
130.348 [96/18/4533] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeCompletionStrings.cpp.o
130.602 [95/18/4534] Linking CXX static library lib/libclangTidyReadabilityModule.a
130.847 [94/18/4535] Linking CXX static library lib/libclangTidyGoogleModule.a
131.010 [93/18/4536] Linking CXX static library lib/libclangTidyFuchsiaModule.a
131.201 [92/18/4537] Linking CXX static library lib/libclangTidyLLVMModule.a
132.148 [91/18/4538] Linking CXX static library lib/libclangTidyModernizeModule.a
132.578 [90/18/4539] Linking CXX static library lib/libclangTidyCppCoreGuidelinesModule.a
133.115 [89/18/4540] Building CXX object tools/clang/tools/extra/clangd/index/remote/CMakeFiles/obj.clangdRemoteIndex.dir/Client.cpp.o
FAILED: tools/clang/tools/extra/clangd/index/remote/CMakeFiles/obj.clangdRemoteIndex.dir/Client.cpp.o 
ccache /usr/bin/clang++ -DGOOGLE_PROTOBUF_NO_RTTI=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/tools/clang/tools/extra/clangd/index/remote -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/remote -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/tools/clang/tools/extra/clangd/../clang-tidy -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang/include -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/tools/clang/include -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/include -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/llvm/include -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd -I/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/tools/clang/tools/extra/clangd -I/usr/local/lib/grpc/include -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 -fno-omit-frame-pointer -gline-tables-only -fsanitize=thread -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/tools/extra/clangd/index/remote/CMakeFiles/obj.clangdRemoteIndex.dir/Client.cpp.o -MF tools/clang/tools/extra/clangd/index/remote/CMakeFiles/obj.clangdRemoteIndex.dir/Client.cpp.o.d -o tools/clang/tools/extra/clangd/index/remote/CMakeFiles/obj.clangdRemoteIndex.dir/Client.cpp.o -c /vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/remote/Client.cpp
In file included from /vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/remote/Client.cpp:9:
In file included from /usr/local/lib/grpc/include/grpc++/grpc++.h:26:
In file included from /usr/local/lib/grpc/include/grpcpp/grpcpp.h:53:
In file included from /usr/local/lib/grpc/include/grpcpp/channel.h:28:
In file included from /usr/local/lib/grpc/include/grpcpp/impl/codegen/completion_queue.h:41:
/usr/local/lib/grpc/include/grpcpp/impl/codegen/rpc_service_method.h:144:7: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
  144 |       default:
      |       ^
In file included from /vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/remote/Client.cpp:13:
In file included from /vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/build/tools/clang/tools/extra/clangd/index/remote/Service.grpc.pb.h:23:
/usr/local/lib/grpc/include/grpcpp/impl/codegen/client_callback.h:111:7: warning: 'grpc::internal::ClientReactor' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
  111 | class ClientReactor {
      |       ^
/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/remote/Client.cpp:190:11: error: allocating an object of abstract class type 'IndexClient'
  190 |       new IndexClient(Channel, Address, ProjectRoot));
      |           ^
/vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/clang-tools-extra/clangd/index/Index.h:172:16: note: unimplemented pure virtual method 'containedRefs' in 'IndexClient'
  172 |   virtual bool containedRefs(
      |                ^
2 warnings and 1 error generated.
133.389 [89/17/4541] Linking CXX static library lib/libclangTidyBugproneModule.a
139.472 [89/16/4542] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RawStringLiteral.cpp.o
140.641 [89/15/4543] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/PopulateSwitch.cpp.o
140.800 [89/14/4544] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ScopifyEnum.cpp.o
141.263 [89/13/4545] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapBinaryOperands.cpp.o
141.812 [89/12/4546] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o
144.205 [89/11/4547] Building CXX object tools/clang/tools/extra/clangd/index/remote/marshalling/CMakeFiles/obj.clangdRemoteMarshalling.dir/Marshalling.cpp.o
144.456 [89/10/4548] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SpecialMembers.cpp.o
144.648 [89/9/4549] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ExtractVariable.cpp.o
144.814 [89/8/4550] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ASTSignals.cpp.o
145.417 [89/7/4551] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/AddUsing.cpp.o
147.135 [89/6/4552] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/obj.clangdMain.dir/Check.cpp.o
147.571 [89/5/4553] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/obj.clangdMain.dir/ClangdMain.cpp.o
153.078 [89/4/4554] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RemoveUsingNamespace.cpp.o
153.140 [89/3/4555] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ExtractFunction.cpp.o
154.416 [89/2/4556] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeComplete.cpp.o
164.368 [89/1/4557] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building clang-tools-extra at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
[1/159] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ProjectAwareIndexTests.cpp.o
[2/159] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -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 -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
In file included from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest.h:72,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include/gmock/gmock-actions.h:145,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include/gmock/gmock.h:56,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:15:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnField_Test::TestBody()’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: ‘fromRanges’ was not declared in this scope; did you mean ‘oFromRanges’?
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
  112 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
      |   ^~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
 5492 |   ASSERT_PRED_FORMAT1(              \
      |   ^~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:599:3: note: in expansion of macro ‘ASSERT_THAT’
  599 |   ASSERT_THAT(IncomingLevel1,
      |   ^~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnVar_Test::TestBody()’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: ‘fromRanges’ was not declared in this scope; did you mean ‘oFromRanges’?
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
  112 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
      |   ^~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
 5492 |   ASSERT_PRED_FORMAT1(              \
      |   ^~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:620:3: note: in expansion of macro ‘ASSERT_THAT’
  620 |   ASSERT_THAT(IncomingLevel1,
      |   ^~~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_CallInDifferentFileThanCaller_Test::TestBody()’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: ‘fromRanges’ was not declared in this scope; did you mean ‘oFromRanges’?
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^~~~~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:109:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
  109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building clang-tools-extra at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
[1/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ProjectAwareIndexTests.cpp.o
[2/157] Linking CXX executable tools/clang/tools/extra/include-cleaner/unittests/ClangIncludeCleanerTests
[3/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
[4/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[5/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -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/clang-armv8-quick/stage1/tools/clang/tools/extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/clangd -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/clangd -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googlemock/include -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
../llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[6/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[7/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[8/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
[9/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[10/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ExpectedTypeTest.cpp.o
[11/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
[12/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexActionTests.cpp.o
[13/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InsertionPointTests.cpp.o
[14/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/QualityTests.cpp.o
[15/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FindTargetTests.cpp.o
[16/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[17/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IncludeCleanerTests.cpp.o
[18/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o
[19/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InlayHintTests.cpp.o
[20/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PreambleTests.cpp.o
[21/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexTests.cpp.o
[22/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HoverTests.cpp.o
[23/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/XRefsTests.cpp.o
[24/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o
[25/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdTests.cpp.o
[26/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
[27/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FileIndexTests.cpp.o
[28/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SelectionTests.cpp.o
[29/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticHighlightingTests.cpp.o
[30/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/BackgroundIndexTests.cpp.o
[31/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FindSymbolsTests.cpp.o
[32/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/RenameTests.cpp.o
[33/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticSelectionTests.cpp.o
[34/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DiagnosticsTests.cpp.o
[35/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrintASTTests.cpp.o
[36/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SerializationTests.cpp.o
[37/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ModulesTests.cpp.o
[38/157] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrerequisiteModulesTest.cpp.o

@HighCommander4
Copy link
Collaborator Author

HighCommander4 commented Nov 26, 2024

Reverted in #117668 due to build breakage.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building clang-tools-extra at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
33.254 [2/70/113] Linking CXX executable tools/clang/tools/extra/unittests/clang-doc/ClangDocTests
33.335 [2/69/114] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapBinaryOperandsTests.cpp.o
33.344 [2/68/115] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AnnotateHighlightingsTests.cpp.o
33.471 [2/67/116] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpRecordLayoutTests.cpp.o
33.570 [2/66/117] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
33.762 [2/65/118] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SymbolInfoTests.cpp.o
33.883 [2/64/119] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
33.884 [2/63/120] Linking CXX executable tools/clang/unittests/ASTMatchers/Dynamic/DynamicASTMatchersTests
33.968 [2/62/121] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ModulesTests.cpp.o
34.292 [2/61/122] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
ccache /usr/lib64/ccache/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/tools/extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/tools/extra/clangd/../clang-tidy -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/tools/extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:72,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-actions.h:145,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include/gmock/gmock.h:56,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:15:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnField_Test::TestBody()’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: ‘fromRanges’ was not declared in this scope
                                 fromRanges(Source.range("Callee")))));
                                 ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
   ASSERT_PRED_FORMAT1(              \
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:599:3: note: in expansion of macro ‘ASSERT_THAT’
   ASSERT_THAT(IncomingLevel1,
   ^~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: note: suggested alternative: ‘oFromRanges’
                                 fromRanges(Source.range("Callee")))));
                                 ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
   ASSERT_PRED_FORMAT1(              \
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:599:3: note: in expansion of macro ‘ASSERT_THAT’
   ASSERT_THAT(IncomingLevel1,
   ^~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnVar_Test::TestBody()’:

@HighCommander4
Copy link
Collaborator Author

Reverted in #117668 due to build breakage.

The buildkite runs in this PR were green, but the PR was based on an older baseline, and some of the affected files have since changed in ways that require an update to the patch.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building clang-tools-extra at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
2 warning(s) in tests

Testing Time: 101.09s

Total Discovered Tests: 4297
  Skipped          :    9 (0.21%)
  Unsupported      : 1168 (27.18%)
  Passed           : 3078 (71.63%)
  Expectedly Failed:   42 (0.98%)
[138/187] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
ccache /usr/lib64/ccache/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/tools/extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/tools/extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:72,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include/gmock/gmock-actions.h:145,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include/gmock/gmock.h:56,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:15:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnField_Test::TestBody()’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: ‘fromRanges’ was not declared in this scope
                                 fromRanges(Source.range("Callee")))));
                                 ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
   ASSERT_PRED_FORMAT1(              \
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:599:3: note: in expansion of macro ‘ASSERT_THAT’
   ASSERT_THAT(IncomingLevel1,
   ^~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: note: suggested alternative: ‘oFromRanges’
                                 fromRanges(Source.range("Callee")))));
                                 ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:79:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h:112:3: note: in expansion of macro ‘GTEST_PRED_FORMAT1_’
   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:5492:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT1’
   ASSERT_PRED_FORMAT1(              \
   ^~~~~~~~~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:599:3: note: in expansion of macro ‘ASSERT_THAT’
   ASSERT_THAT(IncomingLevel1,
   ^~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::CallHierarchy_HierarchyOnVar_Test::TestBody()’:
Step 11 (ninja check 2) failure: stage 2 checked (failure)
...
[77/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[78/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[1062/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/tools/clang/tools/extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/tools/clang/tools/extra/clangd/../clang-tidy -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/tools/clang/tools/extra/clangd -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googlemock/include -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[1106/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[1108/1188] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/SerializeTest.cpp.o
[1109/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[1110/1188] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/StructuralEquivalenceTest.cpp.o
[1111/1188] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/TokenAnnotatorTest.cpp.o
[1112/1188] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/RecursiveASTVisitorTest.cpp.o
[1113/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[1114/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
[1115/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SerializationTests.cpp.o
[1116/1188] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/LexicallyOrderedRecursiveASTVisitorTest.cpp.o
[1117/1188] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTImporterVisibilityTest.cpp.o
[1118/1188] Building CXX object tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/LocateSymbolTest.cpp.o
[1119/1188] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
[1120/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FindTargetTests.cpp.o
[1121/1188] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/DenseMapTest.cpp.o
[1122/1188] Building CXX object unittests/Transforms/Scalar/CMakeFiles/ScalarTests.dir/LoopPassManagerTest.cpp.o
[1123/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexActionTests.cpp.o
[1124/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HoverTests.cpp.o
[1125/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IncludeCleanerTests.cpp.o
[1126/1188] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/APFloatTest.cpp.o
[1127/1188] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassBuilderCallbacksTest.cpp.o
[1128/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o
[1129/1188] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/SandboxIRTest.cpp.o
[1130/1188] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TypeHierarchyTests.cpp.o
[1131/1188] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/TransformerTest.cpp.o
[1132/1188] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPIRBuilderTest.cpp.o
[1133/1188] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/OverlappingReplacementsTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-msan running on sanitizer-buildbot6 while building clang-tools-extra at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[189/1321] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/CFGTest.cpp.o
[190/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/CFGMatchSwitchTest.cpp.o
[191/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/CachedConstAccessorsLatticeTest.cpp.o
[192/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/DeterminismTest.cpp.o
[193/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/DebugSupportTest.cpp.o
[194/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/RIFFTests.cpp.o
[195/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/LoggerTests.cpp.o
[196/1321] Building CXX object tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeROCDLTarget.cpp.o
[197/1321] Building CXX object tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeNVVMTarget.cpp.o
[198/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd/../clang-tidy -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -nostdinc++ -isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/include -isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/include/c++/v1 -fsanitize=memory -Wl,--rpath=/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/lib -L/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/lib -w -stdlib=libc++ -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 -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[199/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompileCommandsTests.cpp.o
[200/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MapLatticeTest.cpp.o
[201/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/JSONTransportTests.cpp.o
[202/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MatchSwitchTest.cpp.o
[203/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/ChromiumCheckModelTest.cpp.o
[204/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/RecordOpsTest.cpp.o
[205/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PathMappingTests.cpp.o
[206/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompilerTests.cpp.o
[207/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[208/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[209/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
[210/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/LoggerTest.cpp.o
[211/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigYAMLTests.cpp.o
[212/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SimplifyConstraintsTest.cpp.o
[213/1321] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/IncludeInserterTest.cpp.o
[214/1321] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/CFGDominatorTree.cpp.o
[215/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ThreadCrashReporterTests.cpp.o
[216/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FuzzyMatchTests.cpp.o
[217/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestIndex.cpp.o
[218/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
[219/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestFS.cpp.o
[220/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[221/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
[222/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ProjectAwareIndexTests.cpp.o
[223/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/LSPClient.cpp.o
[224/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[225/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TestingSupport.cpp.o
Step 10 (stage2/msan check) failure: stage2/msan check (failure)
...
[189/1321] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/CFGTest.cpp.o
[190/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/CFGMatchSwitchTest.cpp.o
[191/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/CachedConstAccessorsLatticeTest.cpp.o
[192/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/DeterminismTest.cpp.o
[193/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/DebugSupportTest.cpp.o
[194/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/RIFFTests.cpp.o
[195/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/LoggerTests.cpp.o
[196/1321] Building CXX object tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeROCDLTarget.cpp.o
[197/1321] Building CXX object tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeNVVMTarget.cpp.o
[198/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd/../clang-tidy -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/tools/extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -nostdinc++ -isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/include -isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/include/c++/v1 -fsanitize=memory -Wl,--rpath=/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/lib -L/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_install_msan/lib -w -stdlib=libc++ -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 -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[199/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompileCommandsTests.cpp.o
[200/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MapLatticeTest.cpp.o
[201/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/JSONTransportTests.cpp.o
[202/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MatchSwitchTest.cpp.o
[203/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/ChromiumCheckModelTest.cpp.o
[204/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/RecordOpsTest.cpp.o
[205/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PathMappingTests.cpp.o
[206/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompilerTests.cpp.o
[207/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[208/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[209/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
[210/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/LoggerTest.cpp.o
[211/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigYAMLTests.cpp.o
[212/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SimplifyConstraintsTest.cpp.o
[213/1321] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/IncludeInserterTest.cpp.o
[214/1321] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/CFGDominatorTree.cpp.o
[215/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ThreadCrashReporterTests.cpp.o
[216/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FuzzyMatchTests.cpp.o
[217/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestIndex.cpp.o
[218/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
[219/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestFS.cpp.o
[220/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[221/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
[222/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ProjectAwareIndexTests.cpp.o
[223/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/LSPClient.cpp.o
[224/1321] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[225/1321] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TestingSupport.cpp.o
Step 13 (stage3/msan check) failure: stage3/msan check (failure)
...
[157/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[158/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TidyProviderTests.cpp.o
[159/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/LSPBinderTests.cpp.o
[160/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/PathTests.cpp.o
[161/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
[162/1186] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MultiVarConstantPropagationTest.cpp.o
[163/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/FileCacheTests.cpp.o
[164/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/GlobalCompilationDatabaseTests.cpp.o
[165/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/MarkupTests.cpp.o
[166/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/tools/extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/tools/extra/clangd/../clang-tidy -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/tools/extra/clangd -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
  601 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
  622 |                                 fromRanges(Source.range("Callee")))));
      |                                 ^
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
  651 |               ElementsAre(AllOf(from(withName("caller")), fromRanges())));
      |                                                           ^
3 errors generated.
[167/1186] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/SerializeTest.cpp.o
[168/1186] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/GtestMatchersTest.cpp.o
[169/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[170/1186] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/UncheckedOptionalAccessModelTest.cpp.o
[171/1186] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersInternalTest.cpp.o
[172/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/URITests.cpp.o
[173/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/MemoryTreeTests.cpp.o
[174/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/ThreadingTests.cpp.o
[175/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[176/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
[177/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompilerTests.cpp.o
[178/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/TraceTests.cpp.o
[179/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
[180/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ExpectedTypeTest.cpp.o
[181/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[182/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ModulesTests.cpp.o
[183/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InsertionPointTests.cpp.o
[184/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[185/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrerequisiteModulesTest.cpp.o
[186/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/QualityTests.cpp.o
[187/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticSelectionTests.cpp.o
[188/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeaderSourceSwitchTests.cpp.o
[189/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IncludeCleanerTests.cpp.o
[190/1186] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/OverlappingReplacementsTest.cpp.o
[191/1186] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TypeErasedDataflowAnalysisTest.cpp.o
[192/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AnnotateHighlightingsTests.cpp.o
[193/1186] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o

@HighCommander4
Copy link
Collaborator Author

Resubmitted with the build failures fixed at #117673.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building clang-tools-extra at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp:9:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h:12:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ParsedAST.h:30:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/FrontendAction.h:23:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/ASTUnit.h:28:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Sema/CodeCompleteConsumer.h:338:31: warning: '@class' command should not be used in a comment attached to a non-class declaration [-Wdocumentation]
    /// Code completion in a @class forward declaration.
                             ~^~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
16.963 [2/50/1145] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/tools/extra/clangd/unittests -I/b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests -I/b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/../include-cleaner/include -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/tools/extra/clangd/../clang-tidy -I/b/1/clang-x86_64-debian-fast/llvm.src/clang/include -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/include -I/b/1/clang-x86_64-debian-fast/llvm.obj/include -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include -I/b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/tools/extra/clangd -I/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include -I/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googlemock/include -std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:9:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ParsedAST.h:24:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/Compiler.h:19:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ModulesBuilder.h:27:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/CompilerInvocation.h:23:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/PathDiagnostic.h:16:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Stmt.h:16:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:372:14: warning: parameter 'UninitArray' not found in the function declaration [-Wdocumentation]
  /// \param UninitArray Marker. Pass an empty UninitArray.
             ^~~~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:380:14: warning: parameter 'UninitStruct' not found in the function declaration [-Wdocumentation]
  /// \param UninitStruct Marker. Pass an empty UninitStruct.
             ^~~~~~~~~~~~
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:9:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ParsedAST.h:24:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/Compiler.h:19:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ModulesBuilder.h:27:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/CompilerInvocation.h:23:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/PathDiagnostic.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/AnalysisDeclContext.h:22:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/CFG.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/ExprCXX.h:21:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/DeclCXX.h:22:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Expr.h:5230:21: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
  /// literal or an @encode?
                    ^~~~~~~
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:9:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/ParsedAST.h:30:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/FrontendAction.h:23:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Frontend/ASTUnit.h:28:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Sema/CodeCompleteConsumer.h:338:31: warning: '@class' command should not be used in a comment attached to a non-class declaration [-Wdocumentation]
    /// Code completion in a @class forward declaration.
                             ~^~~~~~~~~~~~~~~~~~~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
                                fromRanges(Source.range("Callee")))));

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 26, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building clang-tools-extra at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
15.953 [133/58/31] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
16.567 [132/58/32] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ModulesTests.cpp.o
16.736 [131/58/33] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
17.505 [130/58/34] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FeatureModulesTests.cpp.o
17.785 [129/58/35] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
17.799 [128/58/36] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CompilerTests.cpp.o
17.805 [127/58/37] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestWorkspace.cpp.o
17.812 [126/58/38] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
18.164 [125/58/39] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
18.347 [124/58/40] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/clangd/unittests -I/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/unittests -I/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/clangd/../clang-tidy -I/build/buildbot/premerge-monolithic-linux/llvm-project/clang/include -I/build/buildbot/premerge-monolithic-linux/build/tools/clang/include -I/build/buildbot/premerge-monolithic-linux/build/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd -I/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/clangd -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googlemock/include -gmlt -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CallHierarchyTests.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:601:33: error: use of undeclared identifier 'fromRanges'
                                fromRanges(Source.range("Callee")))));
                                ^
/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:622:33: error: use of undeclared identifier 'fromRanges'
                                fromRanges(Source.range("Callee")))));
                                ^
/build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp:651:59: error: use of undeclared identifier 'fromRanges'
              ElementsAre(AllOf(from(withName("caller")), fromRanges())));
                                                          ^
3 errors generated.
18.418 [124/57/41] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeaderSourceSwitchTests.cpp.o
18.472 [124/56/42] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTSignalsTests.cpp.o
18.534 [124/55/43] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ExpectedTypeTest.cpp.o
18.562 [124/54/44] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AnnotateHighlightingsTests.cpp.o
18.619 [124/53/45] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InsertionPointTests.cpp.o
18.858 [124/52/46] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/QualityTests.cpp.o
18.864 [124/51/47] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SymbolInfoTests.cpp.o
18.864 [124/50/48] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrerequisiteModulesTest.cpp.o
18.946 [124/49/49] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticHighlightingTests.cpp.o
19.184 [124/48/50] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticSelectionTests.cpp.o
19.658 [124/47/51] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpASTTests.cpp.o
19.958 [124/46/52] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SyncAPI.cpp.o
20.024 [124/45/53] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpSymbolTests.cpp.o
20.027 [124/44/54] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineOutlineTests.cpp.o
20.029 [124/43/55] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpRecordLayoutTests.cpp.o
20.040 [124/42/56] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SelectionTests.cpp.o
20.064 [124/41/57] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AddUsingTests.cpp.o
20.244 [124/40/58] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/StdLibTests.cpp.o
20.452 [124/39/59] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineInlineTests.cpp.o
20.711 [124/38/60] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SerializationTests.cpp.o
20.947 [124/37/61] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandMacroTests.cpp.o
21.292 [124/36/62] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
21.457 [124/35/63] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IndexActionTests.cpp.o
21.764 [124/34/64] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandDeducedTypeTests.cpp.o
21.793 [124/33/65] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FindTargetTests.cpp.o
22.049 [124/32/66] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
22.150 [124/31/67] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants