Skip to content

[LifetimeSafety] Revamp test suite using unittests #149158

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

usx95
Copy link
Contributor

@usx95 usx95 commented Jul 16, 2025

Refactor the Lifetime Safety Analysis infrastructure to support unit testing.

  • Created a public API class LifetimeSafetyAnalysis that encapsulates the analysis functionality
  • Added support for test points via a special TestPointFact that can be used to mark specific program points
  • Added unit tests that verify loan propagation in various code patterns

Copy link
Contributor Author

usx95 commented Jul 16, 2025

@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch 4 times, most recently from b608946 to 299ff30 Compare July 16, 2025 20:49
Copy link

github-actions bot commented Jul 16, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from 299ff30 to 0311169 Compare July 16, 2025 20:56
@usx95 usx95 moved this to In Progress in Lifetime Safety in Clang Jul 16, 2025
@usx95 usx95 changed the base branch from main to users/usx95/07-16-lifetime-lattice-tracking-per-point July 16, 2025 22:07
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from 0311169 to 55c972e Compare July 16, 2025 22:07
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from 55c972e to 8f3ea32 Compare July 16, 2025 22:27
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-lattice-tracking-per-point branch 2 times, most recently from a0b1ef0 to 3e67c98 Compare July 17, 2025 09:48
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from 8f3ea32 to 4c32c7a Compare July 17, 2025 09:48
@usx95 usx95 marked this pull request as ready for review July 17, 2025 12:27
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:analysis labels Jul 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

@llvm/pr-subscribers-clang-analysis

@llvm/pr-subscribers-clang

Author: Utkarsh Saxena (usx95)

Changes

Refactor the Lifetime Safety Analysis infrastructure to support unit testing.

  • Created a public API class LifetimeSafetyAnalysis that encapsulates the analysis functionality
  • Added support for test points via a special TestPointFact that can be used to mark specific program points
  • Added unit tests that verify loan propagation in various code patterns

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

5 Files Affected:

  • (modified) clang/include/clang/Analysis/Analyses/LifetimeSafety.h (+73-5)
  • (modified) clang/lib/Analysis/LifetimeSafety.cpp (+128-46)
  • (modified) clang/lib/Sema/AnalysisBasedWarnings.cpp (+2-2)
  • (modified) clang/unittests/Analysis/CMakeLists.txt (+1)
  • (added) clang/unittests/Analysis/LifetimeSafetyTest.cpp (+424)
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
index 9998702a41cab..ff71147a20f6c 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety.h
@@ -17,14 +17,82 @@
 //===----------------------------------------------------------------------===//
 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
 #define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
-#include "clang/AST/DeclBase.h"
 #include "clang/Analysis/AnalysisDeclContext.h"
 #include "clang/Analysis/CFG.h"
-namespace clang {
+#include "llvm/ADT/ImmutableSet.h"
+#include "llvm/ADT/StringMap.h"
+#include <memory>
 
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
-                               AnalysisDeclContext &AC);
+namespace clang::lifetimes {
+namespace internal {
+// Forward declarations of internal types.
+class Fact;
+class FactManager;
+class LoanPropagationAnalysis;
+struct LifetimeFactory;
 
-} // namespace clang
+/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
+/// Used for giving ID to loans and origins.
+template <typename Tag> struct ID {
+  uint32_t Value = 0;
+
+  bool operator==(const ID<Tag> &Other) const { return Value == Other.Value; }
+  bool operator!=(const ID<Tag> &Other) const { return !(*this == Other); }
+  bool operator<(const ID<Tag> &Other) const { return Value < Other.Value; }
+  ID<Tag> operator++(int) {
+    ID<Tag> Tmp = *this;
+    ++Value;
+    return Tmp;
+  }
+  void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
+    IDBuilder.AddInteger(Value);
+  }
+};
+
+using LoanID = ID<struct LoanTag>;
+using OriginID = ID<struct OriginTag>;
+
+// Using LLVM's immutable collections is efficient for dataflow analysis
+// as it avoids deep copies during state transitions.
+// TODO(opt): Consider using a bitset to represent the set of loans.
+using LoanSet = llvm::ImmutableSet<LoanID>;
+using OriginSet = llvm::ImmutableSet<OriginID>;
+
+using ProgramPoint = std::pair<const CFGBlock *, const Fact *>;
+
+/// Running the lifetime safety analysis and querying its results. It
+/// encapsulates the various dataflow analyses.
+class LifetimeSafetyAnalysis {
+public:
+  LifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+  ~LifetimeSafetyAnalysis();
+
+  void run();
+
+  /// Returns the set of loans an origin holds at a specific program point.
+  LoanSet getLoansAtPoint(OriginID OID, ProgramPoint PP) const;
+
+  /// Finds the OriginID for a given declaration.
+  /// Returns a null optional if not found.
+  std::optional<OriginID> getOriginIDForDecl(const ValueDecl *D) const;
+
+  /// Finds the LoanID for a loan created on a specific variable.
+  /// Returns a null optional if not found.
+  std::optional<LoanID> getLoanIDForVar(const VarDecl *VD) const;
+
+  llvm::StringMap<ProgramPoint> getTestPoints() const;
+
+private:
+  AnalysisDeclContext &AC;
+  std::unique_ptr<LifetimeFactory> Factory;
+  std::unique_ptr<FactManager> FactMgr;
+  std::unique_ptr<LoanPropagationAnalysis> LoanPropagation;
+};
+} // namespace internal
+
+/// The main entry point for the analysis.
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC);
+
+} // namespace clang::lifetimes
 
 #endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
diff --git a/clang/lib/Analysis/LifetimeSafety.cpp b/clang/lib/Analysis/LifetimeSafety.cpp
index a95db6d8013bd..ae5002d680000 100644
--- a/clang/lib/Analysis/LifetimeSafety.cpp
+++ b/clang/lib/Analysis/LifetimeSafety.cpp
@@ -24,8 +24,14 @@
 #include "llvm/Support/TimeProfiler.h"
 #include <cstdint>
 
-namespace clang {
+namespace clang::lifetimes {
+namespace internal {
 namespace {
+template <typename Tag>
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID<Tag> ID) {
+  return OS << ID.Value;
+}
+} // namespace
 
 /// Represents the storage location being borrowed, e.g., a specific stack
 /// variable.
@@ -36,32 +42,6 @@ struct AccessPath {
   AccessPath(const clang::ValueDecl *D) : D(D) {}
 };
 
-/// A generic, type-safe wrapper for an ID, distinguished by its `Tag` type.
-/// Used for giving ID to loans and origins.
-template <typename Tag> struct ID {
-  uint32_t Value = 0;
-
-  bool operator==(const ID<Tag> &Other) const { return Value == Other.Value; }
-  bool operator!=(const ID<Tag> &Other) const { return !(*this == Other); }
-  bool operator<(const ID<Tag> &Other) const { return Value < Other.Value; }
-  ID<Tag> operator++(int) {
-    ID<Tag> Tmp = *this;
-    ++Value;
-    return Tmp;
-  }
-  void Profile(llvm::FoldingSetNodeID &IDBuilder) const {
-    IDBuilder.AddInteger(Value);
-  }
-};
-
-template <typename Tag>
-inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID<Tag> ID) {
-  return OS << ID.Value;
-}
-
-using LoanID = ID<struct LoanTag>;
-using OriginID = ID<struct OriginTag>;
-
 /// Information about a single borrow, or "Loan". A loan is created when a
 /// reference or pointer is created.
 struct Loan {
@@ -223,7 +203,9 @@ class Fact {
     /// An origin is propagated from a source to a destination (e.g., p = q).
     AssignOrigin,
     /// An origin escapes the function by flowing into the return value.
-    ReturnOfOrigin
+    ReturnOfOrigin,
+    /// A marker for a specific point in the code, for testing.
+    TestPoint,
   };
 
 private:
@@ -310,6 +292,24 @@ class ReturnOfOriginFact : public Fact {
   }
 };
 
+/// A dummy-fact used to mark a specific point in the code for testing.
+/// It is generated by recognizing a `void("__lifetime_test_point_...")` cast.
+class TestPointFact : public Fact {
+  std::string Annotation;
+
+public:
+  static bool classof(const Fact *F) { return F->getKind() == Kind::TestPoint; }
+
+  explicit TestPointFact(std::string Annotation)
+      : Fact(Kind::TestPoint), Annotation(std::move(Annotation)) {}
+
+  const std::string &getAnnotation() const { return Annotation; }
+
+  void dump(llvm::raw_ostream &OS) const override {
+    OS << "TestPoint (Annotation: \"" << getAnnotation() << "\")\n";
+  }
+};
+
 class FactManager {
 public:
   llvm::ArrayRef<const Fact *> getFacts(const CFGBlock *B) const {
@@ -363,6 +363,7 @@ class FactManager {
 };
 
 class FactGenerator : public ConstStmtVisitor<FactGenerator> {
+  using Base = ConstStmtVisitor<FactGenerator>;
 
 public:
   FactGenerator(FactManager &FactMgr, AnalysisDeclContext &AC)
@@ -458,6 +459,15 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
     }
   }
 
+  void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *FCE) {
+    // Check if this is a test point marker. If so, we are done with this
+    // expression.
+    if (VisitTestPoint(FCE))
+      return;
+    // Visit as normal otherwise.
+    Base::VisitCXXFunctionalCastExpr(FCE);
+  }
+
 private:
   // Check if a type has an origin.
   bool hasOrigin(QualType QT) { return QT->isPointerOrReferenceType(); }
@@ -491,6 +501,27 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
     }
   }
 
+  /// Checks if the expression is a `void("__lifetime_test_point_...")` cast.
+  /// If so, creates a `TestPointFact` and returns true.
+  bool VisitTestPoint(const CXXFunctionalCastExpr *FCE) {
+    if (!FCE->getType()->isVoidType())
+      return false;
+
+    const auto *SubExpr = FCE->getSubExpr()->IgnoreParenImpCasts();
+    if (const auto *SL = dyn_cast<StringLiteral>(SubExpr)) {
+      llvm::StringRef LiteralValue = SL->getString();
+      const std::string Prefix = "__lifetime_test_point_";
+
+      if (LiteralValue.starts_with(Prefix)) {
+        std::string Annotation = LiteralValue.drop_front(Prefix.length()).str();
+        CurrentBlockFacts.push_back(
+            FactMgr.createFact<TestPointFact>(Annotation));
+        return true;
+      }
+    }
+    return false;
+  }
+
   FactManager &FactMgr;
   AnalysisDeclContext &AC;
   llvm::SmallVector<Fact *> CurrentBlockFacts;
@@ -637,6 +668,8 @@ class DataflowAnalysis {
       return D->transfer(In, *F->getAs<AssignOriginFact>());
     case Fact::Kind::ReturnOfOrigin:
       return D->transfer(In, *F->getAs<ReturnOfOriginFact>());
+    case Fact::Kind::TestPoint:
+      return D->transfer(In, *F->getAs<TestPointFact>());
     }
     llvm_unreachable("Unknown fact kind");
   }
@@ -646,14 +679,16 @@ class DataflowAnalysis {
   Lattice transfer(Lattice In, const ExpireFact &) { return In; }
   Lattice transfer(Lattice In, const AssignOriginFact &) { return In; }
   Lattice transfer(Lattice In, const ReturnOfOriginFact &) { return In; }
+  Lattice transfer(Lattice In, const TestPointFact &) { return In; }
 };
 
 namespace utils {
 
 /// Computes the union of two ImmutableSets.
 template <typename T>
-llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A, llvm::ImmutableSet<T> B,
-                           typename llvm::ImmutableSet<T>::Factory &F) {
+static llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A,
+                                  llvm::ImmutableSet<T> B,
+                                  typename llvm::ImmutableSet<T>::Factory &F) {
   if (A.getHeight() < B.getHeight())
     std::swap(A, B);
   for (const T &E : B)
@@ -666,7 +701,7 @@ llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A, llvm::ImmutableSet<T> B,
 // efficient merge could be implemented using a Patricia Trie or HAMT
 // instead of the current AVL-tree-based ImmutableMap.
 template <typename K, typename V, typename Joiner>
-llvm::ImmutableMap<K, V>
+static llvm::ImmutableMap<K, V>
 join(llvm::ImmutableMap<K, V> A, llvm::ImmutableMap<K, V> B,
      typename llvm::ImmutableMap<K, V>::Factory &F, Joiner joinValues) {
   if (A.getHeight() < B.getHeight())
@@ -690,10 +725,6 @@ join(llvm::ImmutableMap<K, V> A, llvm::ImmutableMap<K, V> B,
 //                          Loan Propagation Analysis
 // ========================================================================= //
 
-// Using LLVM's immutable collections is efficient for dataflow analysis
-// as it avoids deep copies during state transitions.
-// TODO(opt): Consider using a bitset to represent the set of loans.
-using LoanSet = llvm::ImmutableSet<LoanID>;
 using OriginLoanMap = llvm::ImmutableMap<OriginID, LoanSet>;
 
 /// An object to hold the factories for immutable collections, ensuring
@@ -807,17 +838,27 @@ class LoanPropagationAnalysis
 // - Modify origin liveness analysis to answer `bool isLive(Origin O, Point P)`
 // - Using the above three to perform the final error reporting.
 // ========================================================================= //
-} // anonymous namespace
 
-void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
-                               AnalysisDeclContext &AC) {
+// ========================================================================= //
+//                  LifetimeSafetyAnalysis Class Implementation
+// ========================================================================= //
+
+LifetimeSafetyAnalysis::~LifetimeSafetyAnalysis() = default;
+
+LifetimeSafetyAnalysis::LifetimeSafetyAnalysis(AnalysisDeclContext &AC)
+    : AC(AC), Factory(std::make_unique<LifetimeFactory>()),
+      FactMgr(std::make_unique<FactManager>()) {}
+
+void LifetimeSafetyAnalysis::run() {
   llvm::TimeTraceScope TimeProfile("LifetimeSafetyAnalysis");
+
+  const CFG &Cfg = *AC.getCFG();
   DEBUG_WITH_TYPE("PrintCFG", Cfg.dump(AC.getASTContext().getLangOpts(),
                                        /*ShowColors=*/true));
-  FactManager FactMgr;
-  FactGenerator FactGen(FactMgr, AC);
+
+  FactGenerator FactGen(*FactMgr, AC);
   FactGen.run();
-  DEBUG_WITH_TYPE("LifetimeFacts", FactMgr.dump(Cfg, AC));
+  DEBUG_WITH_TYPE("LifetimeFacts", FactMgr->dump(Cfg, AC));
 
   /// TODO(opt): Consider optimizing individual blocks before running the
   /// dataflow analysis.
@@ -828,9 +869,50 @@ void runLifetimeSafetyAnalysis(const DeclContext &DC, const CFG &Cfg,
   ///    blocks; only Decls are visible.  Therefore, loans in a block that
   ///    never reach an Origin associated with a Decl can be safely dropped by
   ///    the analysis.
-  LifetimeFactory Factory;
-  LoanPropagationAnalysis LoanPropagation(Cfg, AC, FactMgr, Factory);
-  LoanPropagation.run();
-  DEBUG_WITH_TYPE("LifetimeLoanPropagation", LoanPropagation.dump());
+  LoanPropagation =
+      std::make_unique<LoanPropagationAnalysis>(Cfg, AC, *FactMgr, *Factory);
+  LoanPropagation->run();
+  DEBUG_WITH_TYPE("LifetimeLoanPropagation", LoanPropagation->dump());
+}
+
+LoanSet LifetimeSafetyAnalysis::getLoansAtPoint(OriginID OID,
+                                                ProgramPoint PP) const {
+  assert(LoanPropagation && "Analysis has not been run.");
+  return LoanPropagation->getLoans(OID, PP);
+}
+
+std::optional<OriginID>
+LifetimeSafetyAnalysis::getOriginIDForDecl(const ValueDecl *D) const {
+  assert(FactMgr && "FactManager not initialized");
+  // This assumes the OriginManager's `get` can find an existing origin.
+  // We might need a `find` method on OriginManager to avoid `getOrCreate` logic
+  // in a const-query context if that becomes an issue.
+  return FactMgr->getOriginMgr().get(*D);
+}
+
+std::optional<LoanID>
+LifetimeSafetyAnalysis::getLoanIDForVar(const VarDecl *VD) const {
+  assert(FactMgr && "FactManager not initialized");
+  for (const Loan &L : FactMgr->getLoanMgr().getLoans()) {
+    if (L.Path.D == VD)
+      return L.ID;
+  }
+  return std::nullopt;
+}
+
+llvm::StringMap<ProgramPoint> LifetimeSafetyAnalysis::getTestPoints() const {
+  assert(FactMgr && "FactManager not initialized");
+  llvm::StringMap<ProgramPoint> AnnotationToPointMap;
+  for (const CFGBlock *Block : *AC.getCFG())
+    for (const Fact *F : FactMgr->getFacts(Block))
+      if (const auto *TPF = F->getAs<TestPointFact>())
+        AnnotationToPointMap[TPF->getAnnotation()] = {Block, F};
+  return AnnotationToPointMap;
+}
+} // namespace internal
+
+void runLifetimeSafetyAnalysis(AnalysisDeclContext &AC) {
+  internal::LifetimeSafetyAnalysis Analysis(AC);
+  Analysis.run();
 }
-} // namespace clang
+} // namespace clang::lifetimes
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index 5eba024e83634..89c5a3596f584 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -3030,8 +3030,8 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings(
   // TODO: Enable lifetime safety analysis for other languages once it is
   // stable.
   if (EnableLifetimeSafetyAnalysis && S.getLangOpts().CPlusPlus) {
-    if (CFG *cfg = AC.getCFG())
-      runLifetimeSafetyAnalysis(*cast<DeclContext>(D), *cfg, AC);
+    if (AC.getCFG())
+      lifetimes::runLifetimeSafetyAnalysis(AC);
   }
   // Check for violations of "called once" parameter properties.
   if (S.getLangOpts().ObjC && !S.getLangOpts().CPlusPlus &&
diff --git a/clang/unittests/Analysis/CMakeLists.txt b/clang/unittests/Analysis/CMakeLists.txt
index 059a74843155c..52e7d2854633d 100644
--- a/clang/unittests/Analysis/CMakeLists.txt
+++ b/clang/unittests/Analysis/CMakeLists.txt
@@ -4,6 +4,7 @@ add_clang_unittest(ClangAnalysisTests
   CloneDetectionTest.cpp
   ExprMutationAnalyzerTest.cpp
   IntervalPartitionTest.cpp
+  LifetimeSafetyTest.cpp
   MacroExpansionContextTest.cpp
   UnsafeBufferUsageTest.cpp
   CLANG_LIBS
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
new file mode 100644
index 0000000000000..49339f4b99a34
--- /dev/null
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -0,0 +1,424 @@
+//===- LifetimeSafetyTest.cpp - Lifetime Safety Tests -*---------- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/ASTMatchers/ASTMatchers.h"
+#include "clang/Testing/TestAST.h"
+#include "llvm/ADT/StringMap.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include <optional>
+#include <vector>
+
+namespace clang::lifetimes::internal {
+namespace {
+
+using namespace ast_matchers;
+using ::testing::UnorderedElementsAreArray;
+
+// A helper class to run the full lifetime analysis on a piece of code
+// and provide an interface for querying the results.
+class LifetimeTestRunner {
+public:
+  LifetimeTestRunner(llvm::StringRef Code) {
+    std::string FullCode = R"(
+      #define POINT(name) void("__lifetime_test_point_" #name)
+      struct MyObj { ~MyObj() {} int i; };
+    )";
+    FullCode += Code.str();
+
+    TestAST = std::make_unique<clang::TestAST>(FullCode);
+    ASTCtx = &TestAST->context();
+
+    // Find the target function using AST matchers.
+    auto MatchResult =
+        match(functionDecl(hasName("target")).bind("target"), *ASTCtx);
+    auto *FD = selectFirst<FunctionDecl>("target", MatchResult);
+    if (!FD) {
+      ADD_FAILURE() << "Test case must have a function named 'target'";
+      return;
+    }
+    AnalysisCtx = std::make_unique<AnalysisDeclContext>(nullptr, FD);
+    AnalysisCtx->getCFGBuildOptions().setAllAlwaysAdd();
+
+    // Run the main analysis.
+    Analysis = std::make_unique<LifetimeSafetyAnalysis>(*AnalysisCtx);
+    Analysis->run();
+
+    AnnotationToPointMap = Analysis->getTestPoints();
+  }
+
+  LifetimeSafetyAnalysis &getAnalysis() { return *Analysis; }
+  ASTContext &getASTContext() { return *ASTCtx; }
+
+  ProgramPoint getProgramPoint(llvm::StringRef Annotation) {
+    auto It = AnnotationToPointMap.find(Annotation);
+    if (It == AnnotationToPointMap.end()) {
+      ADD_FAILURE() << "Annotation '" << Annotation << "' not found.";
+      return {nullptr, nullptr};
+    }
+    return It->second;
+  }
+
+private:
+  std::unique_ptr<TestAST> TestAST;
+  ASTContext *ASTCtx = nullptr;
+  std::unique_ptr<AnalysisDeclContext> AnalysisCtx;
+  std::unique_ptr<LifetimeSafetyAnalysis> Analysis;
+  llvm::StringMap<ProgramPoint> AnnotationToPointMap;
+};
+
+// A convenience wrapper that uses the LifetimeSafetyAnalysis public API.
+class LifetimeTestHelper {
+public:
+  LifetimeTestHelper(LifetimeTestRunner &Runner)
+      : Runner(Runner), Analysis(Runner.getAnalysis()) {}
+
+  std::optional<OriginID> getOriginForDecl(llvm::StringRef VarName) {
+    auto *VD = findDecl<ValueDecl>(VarName);
+    if (!VD)
+      return std::nullopt;
+    auto OID = Analysis.getOriginIDForDecl(VD);
+    if (!OID)
+      ADD_FAILURE() << "Origin for '" << VarName << "' not found.";
+    return OID;
+  }
+
+  std::optional<LoanID> getLoanForVar(llvm::StringRef VarName) {
+    auto *VD = findDecl<VarDecl>(VarName);
+    if (!VD)
+      return std::nullopt;
+    auto LID = Analysis.getLoanIDForVar(VD);
+    if (!LID)
+      ADD_FAILURE() << "Loan for '" << VarName << "' not found.";
+    return LID;
+  }
+
+  std::optional<LoanSet> getLoansAtPoint(OriginID OID,
+                                         llvm::StringRef Annotation) {
+    ProgramPoint PP = Runner.getProgramPoint(Annotation);
+    if (!PP.first)
+      return std::nullopt;
+    return Analysis.getLoansAtPoint(OID, PP);
+  }
+
+private:
+  template <typename DeclT> DeclT *findDecl(llvm::StringRef Name) {
+    auto &Ctx = Runner.getASTContext();
+    auto Results = match(valueDecl(hasName(Name)).bind("v"), Ctx);
+    if (Results.empty()) {
+      ADD_FAILURE() << "Declaration '" << Name << "' not found in AST.";
+      return nullptr;
+    }
+    return const_cast<DeclT *>(selectFirst<DeclT>("v", Results));
+  }
+
+  LifetimeTestRunner &Runner;
+  LifetimeSafetyAnalysis &Analysis;
+};
+
+// ========================================================================= //
+//                         GTest Matchers & Fixture
+// ========================================================================= //
+
+// It holds the name of the origin variable and a reference to the helper.
+class OriginInfo {
+public:
+  OriginInfo(llvm::StringRef OriginVar, LifetimeTestHelper &Helper)
+      : OriginVar(OriginVar), Helper(Helper) {}
+  llvm::StringRef OriginVar;
+  LifetimeTestHelper &Helper;
+};
+
+// The implementation of the matcher. It takes a vector of strings.
+MATCHER_P2(HasLoansToImpl, LoanVars, Annotation, "") {
+  const OriginInfo &Info = arg;
+  std::optional<OriginID> OIDOpt = Info....
[truncated]

@usx95 usx95 requested review from jvoung, Xazax-hun and ymand July 17, 2025 12:28
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from 4c32c7a to 1b945d0 Compare July 17, 2025 12:29
@usx95 usx95 force-pushed the users/usx95/07-16-lifetime-safety-add-unit-tests branch from e6fc855 to ad8d8a8 Compare July 21, 2025 22:04
Copy link
Contributor Author

usx95 commented Jul 22, 2025

Merge activity

  • Jul 22, 10:30 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 22, 10:32 AM UTC: @usx95 merged this pull request with Graphite.

@usx95 usx95 merged commit 688ea04 into main Jul 22, 2025
9 checks passed
@usx95 usx95 deleted the users/usx95/07-16-lifetime-safety-add-unit-tests branch July 22, 2025 10:32
@github-project-automation github-project-automation bot moved this from In Progress to Done in Lifetime Safety in Clang Jul 22, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
3.704 [2/10/1059] Linking CXX executable unittests/Transforms/Utils/UtilsTests
3.752 [2/9/1060] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
3.885 [2/8/1061] Linking CXX executable unittests/Passes/Plugins/PluginsTests
3.971 [2/7/1062] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
4.013 [2/6/1063] Linking CXX executable unittests/Target/X86/X86Tests
4.038 [2/5/1064] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
4.161 [2/4/1065] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
5.429 [2/3/1066] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
5.500 [2/2/1067] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
10.204 [2/1/1068] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Tooling -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building clang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
0.491 [1/4/172] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundixf.S.o
0.494 [1/3/173] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/multf3.c.o
0.496 [1/2/174] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/trunctfxf2.c.o
0.569 [1/1/175] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/cpu_model/x86.c.o
0.584 [0/1/176] Linking C static library /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
70.880 [16/22/7237] Linking CXX executable bin/llvm-dwp
71.380 [15/21/7238] No install step for 'builtins'
71.390 [14/21/7240] Completed 'builtins'
71.423 [14/20/7241] Linking CXX executable bin/llvm-dwarfutil
71.656 [14/19/7242] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Tooling -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
71.877 [14/18/7243] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
72.199 [14/17/7244] Linking CXX executable bin/llvm-split
72.531 [14/16/7245] Linking CXX static library lib/libclangTidyCppCoreGuidelinesModule.a
73.965 [14/15/7246] Linking CXX executable bin/llvm-opt-fuzzer
80.360 [14/14/7247] Linking CXX executable tools/clang/tools/extra/unittests/clang-tidy/ClangTidyTests
82.432 [14/13/7248] Linking CXX executable unittests/CodeGen/CodeGenTests
84.169 [14/12/7249] Linking CXX executable bin/opt
84.306 [14/11/7250] Linking CXX executable bin/llvm-reduce
84.816 [14/10/7251] Linking CXX executable unittests/MI/MITests
85.252 [14/9/7252] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
85.922 [14/8/7253] Linking CXX executable unittests/MIR/MIRTests
85.953 [14/7/7254] Linking CXX executable unittests/Target/TargetMachineCTests
86.547 [14/6/7255] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
86.606 [14/5/7256] Linking CXX executable bin/llvm-lto2
86.936 [14/4/7257] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
87.519 [14/3/7258] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
87.521 [14/2/7259] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
89.029 [14/1/7260] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder clang-x86_64-linux-abi-test running on sie-linux-worker2 while building clang at step 6 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 6 (build-unified-tree) failure: build (failure)
...
  255 |   virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
      |                ^~~~~~~~~~~~~~
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
206.404 [1371/10/5894] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/BitfieldInitializer.cpp.o
206.778 [1370/10/5895] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Attr.cpp.o
206.836 [1369/10/5896] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp.o
206.838 [1368/10/5897] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksUnaryOperator.cpp.o
206.896 [1367/10/5898] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/buildbot/buildbot-root/abi-test/build/tools/clang/unittests -I/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests -I/home/buildbot/buildbot-root/abi-test/llvm/clang/include -I/home/buildbot/buildbot-root/abi-test/build/tools/clang/include -I/home/buildbot/buildbot-root/abi-test/build/include -I/home/buildbot/buildbot-root/abi-test/llvm/llvm/include -I/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Tooling -I/home/buildbot/buildbot-root/abi-test/llvm/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/abi-test/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/abi-test/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
206.923 [1367/9/5899] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksBinaryOperator.cpp.o
206.963 [1367/8/5900] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCompoundAssignOperator.cpp.o
206.986 [1367/7/5901] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Class.cpp.o
207.115 [1367/6/5902] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCallExpr.cpp.o
207.198 [1367/5/5903] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Concept.cpp.o
207.219 [1367/4/5904] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/ConstructExpr.cpp.o
207.387 [1367/3/5905] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CXXMemberCall.cpp.o
207.428 [1367/2/5906] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CXXMethodDecl.cpp.o
207.437 [1367/1/5907] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CXXBoolLiteralExpr.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building clang at step 7 "Add check check-clang".

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

Here is the relevant piece of the build log for the reference
Step 7 (Add check check-clang) failure: test (failure)
...
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Serialization/ASTReader.h:255:16: warning: ‘virtual bool clang::ASTReaderListener::visitInputFile(llvm::StringRef, llvm::StringRef, bool, bool, bool)’ was hidden [-Woverloaded-virtual]
  255 |   virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
      |                ^~~~~~~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
[291/296] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/CodeCompletionTest.cpp.o
[292/296] Building CXX object tools/clang/unittests/Interpreter/CMakeFiles/ClangReplInterpreterTests.dir/IncrementalProcessingTest.cpp.o
[293/296] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
[294/296] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
ccache /usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/unittests -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/include -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/include -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Tooling -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/third-party/unittest/googletest/include -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building clang at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[21/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/ModuleDeclStateTest.cpp.o
[22/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
[23/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/ArenaTest.cpp.o
[24/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPDependencyDirectivesTest.cpp.o
[25/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DataflowAnalysisContextTest.cpp.o
[26/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/LexerTest.cpp.o
[27/1009] Building CXX object tools/clang/lib/Testing/CMakeFiles/clangTesting.dir/TestAST.cpp.o
[28/1009] Linking CXX static library lib/libclangTesting.a
[29/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/APSIntTypeTest.cpp.o
[30/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/unittests -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Tooling -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googletest/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googlemock/include -march=cascadelake -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
[31/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/DXCModeTest.cpp.o
[32/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ByteCode/BitcastBuffer.cpp.o
[33/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/CallEventTest.cpp.o
[34/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
[35/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ConflictingEvalCallsTest.cpp.o
[36/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/BlockEntranceCallbackTest.cpp.o
[37/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/MacroExpansionContextTest.cpp.o
[38/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/Z3CrosscheckOracleTest.cpp.o
[39/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ExprEngineVisitTest.cpp.o
[40/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Parse/ParseHLSLRootSignatureTest.cpp.o
[41/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPCallbacksTest.cpp.o
[42/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
[43/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ObjcBug-124477.cpp.o
[44/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp.o
[45/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/NoStateChangeFuncVisitorTest.cpp.o
[46/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/RegisterCustomCheckersTest.cpp.o
[47/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/MapLatticeTest.cpp.o
[48/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/TestReturnValueUnderConstruction.cpp.o
[49/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp.o
[50/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/SValSimplifyerTest.cpp.o
[51/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CFGMatchSwitchTest.cpp.o
[52/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGTest.cpp.o
[53/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/TransferBranchTest.cpp.o
[54/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp.o
[55/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGDominatorTree.cpp.o
[56/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DeterminismTest.cpp.o
[57/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/MatchSwitchTest.cpp.o
[58/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/RecordOpsTest.cpp.o
[59/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/IsCLibraryFunctionTest.cpp.o
[60/1009] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DebugSupportTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6969:70: warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
 6969 | CINDEX_DEPRECATED CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
      |                                                                      ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
53.414 [914/18/75] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
57.559 [913/18/76] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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 -Itools/clang/unittests -I/buildbot/worker/arc-folder/llvm-project/clang/unittests -I/buildbot/worker/arc-folder/llvm-project/clang/include -Itools/clang/include -Iinclude -I/buildbot/worker/arc-folder/llvm-project/llvm/include -I/buildbot/worker/arc-folder/llvm-project/clang/unittests/Tooling -I/buildbot/worker/arc-folder/llvm-project/third-party/unittest/googletest/include -I/buildbot/worker/arc-folder/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of 'std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes meaning of 'TestAST' [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: 'TestAST' declared here as 'class clang::TestAST'
   72 | class TestAST {
      |       ^~~~~~~
57.903 [913/17/77] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/ConfigParseTest.cpp.o
58.415 [913/16/78] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
In file included from /buildbot/worker/arc-folder/llvm-project/clang/include/clang/Frontend/ASTUnit.h:16,
                 from /buildbot/worker/arc-folder/llvm-project/clang/include/clang/Frontend/FrontendAction.h:23,
                 from /buildbot/worker/arc-folder/llvm-project/clang/include/clang/Tooling/Tooling.h:35,
                 from /buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/CloneDetectionTest.cpp:11:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6959:78: warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
 6959 | CINDEX_DEPRECATED CINDEX_LINKAGE CXRemapping clang_getRemappings(const char *);
      |                                                                              ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6962:56: warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
 6962 | clang_getRemappingsFromFileList(const char **, unsigned);
      |                                                        ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6964:78: warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
 6964 | CINDEX_DEPRECATED CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
      |                                                                              ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6967:71: warning: 'CXRemapping' is deprecated [-Wdeprecated-declarations]
 6967 | clang_remap_getFilenames(CXRemapping, unsigned, CXString *, CXString *);
      |                                                                       ^
/buildbot/worker/arc-folder/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building clang at step 6 "test".

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

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/4/12 (3333 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/5/12 (3334 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/6/12 (3335 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/7/12 (3336 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/8/12 (3337 of 3342)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/9/12 (3338 of 3342)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/0/2 (3339 of 3342)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/1/2 (3340 of 3342)
PASS: lldb-unit :: Process/gdb-remote/./ProcessGdbRemoteTests/8/35 (3341 of 3342)
TIMEOUT: lldb-api :: tools/lldb-dap/module/TestDAP_module.py (3342 of 3342)
******************** TEST 'lldb-api :: tools/lldb-dap/module/TestDAP_module.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --cmake-build-type Release /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/module -p TestDAP_module.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb)
  clang revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb
  llvm revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb

--
Command Output (stderr):
--
========= DEBUG ADAPTER PROTOCOL LOGS =========
1753182477.645302773 (stdio) --> {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1753182477.650547743 (stdio) <-- {"body":{"$__lldb_version":"lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb)\n  clang revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb\n  llvm revision 688ea048affe8e79221ea1a8c376bcf20ef8f3bb","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"description":"C++ Catch","filter":"cpp_catch","label":"C++ Catch","supportsCondition":true},{"description":"C++ Throw","filter":"cpp_throw","label":"C++ Throw","supportsCondition":true},{"description":"Objective-C Catch","filter":"objc_catch","label":"Objective-C Catch","supportsCondition":true},{"description":"Objective-C Throw","filter":"objc_throw","label":"Objective-C Throw","supportsCondition":true}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true,"supportsWriteMemoryRequest":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1753182477.651602268 (stdio) --> {"command":"launch","type":"request","arguments":{"program":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/module/TestDAP_module.test_compile_units/a.out","initCommands":["settings clear --all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"],"disableASLR":false,"enableAutoVariableSummaries":false,"enableSyntheticChildDebugging":false,"displayExtendedBacktrace":false},"seq":2}
1753182477.652010679 (stdio) <-- {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1753182477.652058125 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings clear --all\n"},"event":"output","seq":0,"type":"event"}
1753182477.652075052 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1753182477.652089834 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1753182477.652104139 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1753182477.652118206 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1753182477.652131319 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1753182477.652144670 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1753182477.652179718 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1753182477.652194977 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1753182477.652208567 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1753182477.805447102 (stdio) <-- {"command":"launch","request_seq":2,"seq":0,"success":true,"type":"response"}
1753182477.805520058 (stdio) <-- {"event":"initialized","seq":0,"type":"event"}
1753182477.805568695 (stdio) <-- {"body":{"module":{"addressRange":"0xf7a13000","debugInfoSize":"983.3KB","id":"253BA35E-436C-EC85-2949-CBD09E38AFEE-11B460BF","name":"ld-linux-armhf.so.3","path":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolFilePath":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1753182477.805835724 (stdio) <-- {"body":{"module":{"addressRange":"0x4d0000","debugInfoSize":"1.1KB","id":"BF0B088A","name":"a.out","path":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/module/TestDAP_module.test_compile_units/a.out","symbolFilePath":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/module/TestDAP_module.test_compile_units/a.out","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1753182477.806842327 (stdio) --> {"command":"setBreakpoints","type":"request","arguments":{"source":{"name":"main.cpp","path":"main.cpp"},"sourceModified":false,"lines":[5],"breakpoints":[{"line":5}]},"seq":3}
1753182477.823987246 (stdio) <-- {"body":{"breakpoints":[{"column":3,"id":1,"instructionReference":"0x4E073C","line":5,"source":{"name":"main.cpp","path":"main.cpp"},"verified":true}]},"command":"setBreakpoints","request_seq":3,"seq":0,"success":true,"type":"response"}
1753182477.824372530 (stdio) <-- {"body":{"breakpoint":{"column":3,"id":1,"instructionReference":"0x4E073C","line":5,"verified":true},"reason":"changed"},"event":"breakpoint","seq":0,"type":"event"}

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
In file included from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Parse/Parser.h:20,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Lex/PPCallbacksTest.cpp:23:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::UnusedFileScopedDecls’ [-Wattributes]
  841 | class Sema final : public SemaBase {
      |       ^~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::TentativeDefinitions’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::ExtVectorDecls’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::DelegatingCtorDecls’ [-Wattributes]
[186/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
[187/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests -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/unittests/Tooling -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 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-Wchanges-meaning]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:19: note: used here to mean ‘class clang::TestAST’
   70 |   std::unique_ptr<TestAST> TestAST;
      |                   ^~~~~~~
In file included from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Testing/TestAST.h:72:7: note: declared here
   72 | class TestAST {
      |       ^~~~~~~
[188/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/ValueTest.cpp.o
[189/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/MacroExpansionContextTest.cpp.o
In file included from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Parse/Parser.h:20,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/MacroExpansionContextTest.cpp:23:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::UnusedFileScopedDecls’ [-Wattributes]
  841 | class Sema final : public SemaBase {
      |       ^~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::TentativeDefinitions’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::ExtVectorDecls’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:841:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::DelegatingCtorDecls’ [-Wattributes]
[190/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
[191/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CFGMatchSwitchTest.cpp.o
[192/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DebugSupportTest.cpp.o
[193/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGTest.cpp.o
[194/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp.o
[195/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/MapLatticeTest.cpp.o
[196/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/LoggerTest.cpp.o
[197/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/ASTOpsTest.cpp.o
[198/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/ChromiumCheckModelTest.cpp.o
[199/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGDominatorTree.cpp.o
[200/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/MatchSwitchTest.cpp.o
[201/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/APSIntTypeTest.cpp.o
[202/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp.o
[203/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/SimplifyConstraintsTest.cpp.o
[204/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/TestingSupport.cpp.o
[205/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DeterminismTest.cpp.o
[206/1163] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/IntervalPartitionTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-key-instructions running on sie-linux-worker5 while building clang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
178.175 [1386/10/5257] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/StandardLibraryTest.cpp.o
178.663 [1385/10/5258] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DiagnosticsYamlTest.cpp.o
178.721 [1384/10/5259] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/ExecutionTest.cpp.o
178.762 [1383/10/5260] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DependencyScanning/DependencyScanningFilesystemTest.cpp.o
178.803 [1382/10/5261] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/CompilationDatabaseTest.cpp.o
179.041 [1381/10/5262] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/QualTypeNamesTest.cpp.o
179.176 [1380/10/5263] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/HeaderAnalysisTest.cpp.o
179.212 [1379/10/5264] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp.o
179.234 [1378/10/5265] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/LookupTest.cpp.o
179.288 [1377/10/5266] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/buildbot/buildbot-root/llvm-ki/build/tools/clang/unittests -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include -I/home/buildbot/buildbot-root/llvm-ki/build/tools/clang/include -I/home/buildbot/buildbot-root/llvm-ki/build/include -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/llvm/include -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Tooling -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/llvm-ki/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
179.296 [1377/9/5267] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RangeSelectorTest.cpp.o
179.334 [1377/8/5268] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/DependencyScanning/DependencyScannerTest.cpp.o
In file included from /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:19,
                 from /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:17,
                 from /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:13,
                 from /home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp:17:
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Serialization/ASTReader.h:255:16: warning: ‘virtual bool clang::ASTReaderListener::visitInputFile(llvm::StringRef, llvm::StringRef, bool, bool, bool)’ was hidden [-Woverloaded-virtual]
  255 |   virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
      |                ^~~~~~~~~~~~~~
/home/buildbot/buildbot-root/llvm-ki/llvm-project/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
179.634 [1377/7/5269] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/Attr.cpp.o
179.635 [1377/6/5270] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/BitfieldInitializer.cpp.o
179.865 [1377/5/5271] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp.o
179.974 [1377/4/5272] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksUnaryOperator.cpp.o
180.070 [1377/3/5273] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksBinaryOperator.cpp.o
180.070 [1377/2/5274] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCompoundAssignOperator.cpp.o
180.070 [1377/1/5275] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksCallExpr.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
21.672 [5/4/77] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
21.833 [5/3/78] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
22.029 [4/3/79] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
23.542 [4/2/80] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
23.789 [2/3/81] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
23.977 [2/2/82] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
27.583 [2/1/83] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
27.829 [0/2/84] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
28.017 [0/1/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
13.649 [7/47/1172] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
ccache /usr/lib64/ccache/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests -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/unittests/Tooling -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 -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 -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ [-fpermissive]
   std::unique_ptr<TestAST> TestAST;
                            ^~~~~~~
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
 class TestAST {
       ^~~~~~~
23.548 [7/15/1204] Building CXX object unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfUseTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/DataAccessProf.h:25,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/IndexedMemProfData.h:18,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp:15:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:1018:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:1027:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
31.090 [7/5/1214] Linking CXX executable unittests/CodeGen/CodeGenTests
35.853 [7/3/1216] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
43.696 [7/2/1217] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
46.225 [7/1/1218] Linking CXX executable tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building clang at step 6 "build-stage1-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 6 (build-stage1-unified-tree) failure: build (failure)
...
156.023 [9/50/6575] Generating ../../bin/llvm-otool
156.439 [9/49/6576] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
157.235 [9/48/6577] Linking CXX executable bin/llvm-profgen
157.324 [9/47/6578] Linking CXX executable unittests/MC/MCTests
157.340 [9/46/6579] Linking CXX executable bin/llvm-libtool-darwin
157.371 [9/45/6580] Linking CXX executable unittests/tools/llvm-cfi-verify/CFIVerifyTests
157.892 [9/44/6581] Linking CXX executable bin/llvm-lipo
158.173 [9/43/6582] Linking CXX executable bin/llvm-jitlink
158.180 [9/42/6583] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/StandardLibraryTest.cpp.o
158.417 [9/41/6584] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
ccache /usr/lib64/ccache/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Tooling -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ [-fpermissive]
   std::unique_ptr<TestAST> TestAST;
                            ^~~~~~~
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
 class TestAST {
       ^~~~~~~
166.208 [9/40/6585] Linking CXX executable bin/llvm-opt-fuzzer
167.546 [9/39/6586] Linking CXX executable bin/clang-extdef-mapping
168.798 [9/38/6587] Linking CXX executable bin/clang-scan-deps
169.487 [9/37/6588] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
169.937 [9/36/6589] Linking CXX executable bin/clang-nvlink-wrapper
169.997 [9/35/6590] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
170.395 [9/34/6591] Linking CXX executable unittests/MC/AMDGPU/AMDGPUMCTests
170.675 [9/33/6592] Linking CXX executable bin/clang-linker-wrapper
170.944 [9/32/6593] Linking CXX executable bin/dsymutil
170.963 [9/31/6594] Linking CXX executable tools/lld/unittests/AsLibELF/LLDAsLibELFTests
171.988 [9/30/6595] Linking CXX executable bin/opt
172.636 [9/29/6596] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
173.376 [9/28/6597] Linking CXX executable bin/llvm-dwarfutil
173.558 [9/27/6598] Linking CXX executable bin/llvm-dwp
173.676 [9/26/6599] Linking CXX shared library lib/libLTO.so.22.0git
174.006 [9/25/6600] Linking CXX executable unittests/CodeGen/CodeGenTests
174.369 [9/24/6601] Linking CXX executable bin/bugpoint
174.616 [9/23/6602] Linking CXX executable bin/llvm-split
175.063 [9/22/6603] Linking CXX executable bin/llvm-gsymutil
175.705 [9/21/6604] Linking CXX executable bin/llvm-c-test
175.876 [9/20/6605] Linking CXX executable bin/clang-sycl-linker
175.896 [9/19/6606] Linking CXX executable unittests/MIR/MIRTests
175.972 [9/18/6607] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
176.005 [9/17/6608] Linking CXX executable unittests/Target/TargetMachineCTests
176.038 [9/16/6609] Linking CXX executable bin/llvm-isel-fuzzer
176.040 [9/15/6610] Linking CXX executable unittests/MI/MITests
176.705 [9/14/6611] Linking CXX executable bin/llvm-reduce
176.884 [9/13/6612] Linking CXX executable bin/llvm-lto
177.183 [9/12/6613] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
177.312 [9/11/6614] Linking CXX executable bin/llc

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[77/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[78/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[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
[1179/1229] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
ccache /usr/lib64/ccache/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/unittests -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests -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/unittests/Tooling -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 -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 -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ [-fpermissive]
   std::unique_ptr<TestAST> TestAST;
                            ^~~~~~~
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Testing/TestAST.h:72:7: error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
 class TestAST {
       ^~~~~~~
[1208/1229] Building CXX object unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfUseTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/DataAccessProf.h:25,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/IndexedMemProfData.h:18,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp:15:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1018:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1027:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
[1211/1229] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/RISCV/TargetTest.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu-no-asserts running on doug-worker-6 while building clang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6969:70: warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
 6969 | CINDEX_DEPRECATED CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
      |                                                                      ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
293.517 [1385/8/5882] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/gcc-no-asserts/build/tools/clang/unittests -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include -I/home/buildbot/buildbot-root/gcc-no-asserts/build/tools/clang/include -I/home/buildbot/buildbot-root/gcc-no-asserts/build/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
293.621 [1385/7/5883] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp.o
In file included from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Frontend/ASTUnit.h:16,
                 from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang/Frontend/FrontendAction.h:23,
                 from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/TestVisitor.h:21,
                 from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/CRTPTestVisitor.h:17,
                 from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksCommon.h:9,
                 from /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp:9:
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6959:78: warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
 6959 | CINDEX_DEPRECATED CINDEX_LINKAGE CXRemapping clang_getRemappings(const char *);
      |                                                                              ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6962:56: warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
 6962 | clang_getRemappingsFromFileList(const char **, unsigned);
      |                                                        ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6964:78: warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
 6964 | CINDEX_DEPRECATED CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
      |                                                                              ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;
      |               ^~~~~~~~~~~
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6967:71: warning: ‘CXRemapping’ is deprecated [-Wdeprecated-declarations]
 6967 | clang_remap_getFilenames(CXRemapping, unsigned, CXString *, CXString *);
      |                                                                       ^
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/clang/include/clang-c/Index.h:6957:15: note: declared here
 6957 | typedef void *CXRemapping;

usx95 added a commit that referenced this pull request Jul 22, 2025
@usx95
Copy link
Contributor Author

usx95 commented Jul 22, 2025

Reverted in 54b5068
Will fix forward the build breakage!

@usx95
Copy link
Contributor Author

usx95 commented Jul 22, 2025

Should be fixed by changing the name of the field to AST instead of TestAST

error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ [-fpermissive]
   std::unique_ptr<TestAST> TestAST;
                            ^~~~~~~
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Testing/TestAST.h:72:7: error: changes meaning of ‘TestAST’ from ‘class clang::TestAST’ [-fpermissive]
 class TestAST {
       ^~~~~~~

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux running on systemz-1 while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[417/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestJava.cpp.o
[418/1224] Linking CXX executable tools/clang/unittests/Basic/BasicTests
[419/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestMacroExpansion.cpp.o
[420/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestJson.cpp.o
[421/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestProto.cpp.o
[422/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestObjC.cpp.o
[423/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestRawStrings.cpp.o
[424/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestSelective.cpp.o
[425/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestTableGen.cpp.o
[426/1224] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/tools/clang/unittests -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/tools/clang/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/llvm/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Tooling -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/third-party/unittest/googletest/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of 'std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes meaning of 'TestAST' [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/include/clang/Testing/TestAST.h:72:7: note: 'TestAST' declared here as 'class clang::TestAST'
   72 | class TestAST {
      |       ^~~~~~~
[427/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestTextProto.cpp.o
[428/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestVerilog.cpp.o
[429/1224] Linking CXX executable tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.

usx95 added a commit that referenced this pull request Jul 22, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux-lnt running on systemz-1 while building clang at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[399/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DiagnosticTest.cpp.o
[400/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SanitizersTest.cpp.o
[401/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SarifTest.cpp.o
[402/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/LineOffsetMappingTest.cpp.o
[403/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/FileManagerTest.cpp.o
[404/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/OffloadArchTest.cpp.o
[405/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/CharInfoTest.cpp.o
[406/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DarwinSDKInfoTest.cpp.o
[407/1224] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SourceManagerTest.cpp.o
[408/1224] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -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/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/tools/clang/unittests -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/tools/clang/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/llvm/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Tooling -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/third-party/unittest/googletest/include -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of 'std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST' changes meaning of 'TestAST' [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/include/clang/Testing/TestAST.h:72:7: note: 'TestAST' declared here as 'class clang::TestAST'
   72 | class TestAST {
      |       ^~~~~~~
[409/1224] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/BracesInserterTest.cpp.o
[410/1224] Linking CXX executable tools/clang/unittests/Basic/BasicTests
[411/1224] Linking CXX executable tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 22, 2025

LLVM Buildbot has detected a new failure on builder clang-with-thin-lto-ubuntu running on as-worker-92 while building clang at step 6 "build-stage1-compiler".

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

Here is the relevant piece of the build log for the reference
Step 6 (build-stage1-compiler) failure: build (failure)
...
743.208 [1352/72/5209] Linking CXX shared module lib/CheckerOptionHandlingAnalyzerPlugin.so
745.010 [1351/72/5210] Linking CXX executable bin/clang-refactor
745.136 [1350/72/5211] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPCallbacksTest.cpp.o
745.454 [1349/72/5212] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
745.740 [1348/72/5213] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Parse/ParseHLSLRootSignatureTest.cpp.o
745.898 [1347/72/5214] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
746.652 [1346/72/5215] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
747.406 [1345/72/5216] Linking CXX executable bin/clang-sycl-linker
747.924 [1344/72/5217] Linking CXX executable bin/clang-installapi
748.903 [1343/72/5218] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/tools/clang/unittests -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/tools/clang/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Tooling -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
750.284 [1343/71/5219] Building CXX object tools/clang/tools/clang-repl/CMakeFiles/clang-repl.dir/ClangRepl.cpp.o
750.468 [1343/70/5220] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Interpreter.cpp.o
750.687 [1343/69/5221] Building CXX object tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/ClangScanDeps.cpp.o
In file included from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:19,
                 from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:17,
                 from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:13,
                 from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/tools/clang-scan-deps/ClangScanDeps.cpp:15:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:255:16: warning: ‘virtual bool clang::ASTReaderListener::visitInputFile(llvm::StringRef, llvm::StringRef, bool, bool, bool)’ was hidden [-Woverloaded-virtual]
  255 |   virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
      |                ^~~~~~~~~~~~~~
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
750.998 [1343/68/5222] Linking CXX executable bin/clang-nvlink-wrapper
752.647 [1343/67/5223] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/MacroExpansionContextTest.cpp.o
752.801 [1343/66/5224] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/APSIntTypeTest.cpp.o
753.751 [1343/65/5225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ByteCode/BitcastBuffer.cpp.o
754.079 [1343/64/5226] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/Z3CrosscheckOracleTest.cpp.o
755.081 [1343/63/5227] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ExprEngineVisitTest.cpp.o
755.148 [1343/62/5228] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
755.355 [1343/61/5229] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ConflictingEvalCallsTest.cpp.o
755.445 [1343/60/5230] Linking CXX executable bin/clang-linker-wrapper
755.687 [1343/59/5231] Linking CXX executable bin/clang-check
757.019 [1343/58/5232] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGDominatorTree.cpp.o
757.118 [1343/57/5233] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/BlockEntranceCallbackTest.cpp.o
757.220 [1343/56/5234] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/CallEventTest.cpp.o
757.464 [1343/55/5235] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/NoStateChangeFuncVisitorTest.cpp.o
757.834 [1343/54/5236] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp.o
757.991 [1343/53/5237] Linking CXX executable bin/clang-22
758.130 [1343/52/5238] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CFGTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 26, 2025

LLVM Buildbot has detected a new failure on builder clang-with-lto-ubuntu running on as-worker-91 while building clang at step 6 "build-stage1-compiler".

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

Here is the relevant piece of the build log for the reference
Step 6 (build-stage1-compiler) failure: build (failure)
...
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
759.542 [1339/72/5222] Linking CXX executable bin/clang-import-test
760.230 [1338/72/5223] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/AnalyzerOptionsTest.cpp.o
762.244 [1337/72/5224] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/CloneDetectionTest.cpp.o
763.290 [1336/72/5225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Parse/ParseHLSLRootSignatureTest.cpp.o
763.376 [1335/72/5226] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
764.030 [1334/72/5227] Linking CXX executable bin/clang-installapi
764.420 [1333/72/5228] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/tools/clang/unittests -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/tools/clang/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Tooling -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/LifetimeSafetyTest.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:70:28: error: declaration of ‘std::unique_ptr<clang::TestAST> clang::lifetimes::internal::{anonymous}::LifetimeTestRunner::TestAST’ changes meaning of ‘TestAST’ [-fpermissive]
   70 |   std::unique_ptr<TestAST> TestAST;
      |                            ^~~~~~~
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:12:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Testing/TestAST.h:72:7: note: ‘TestAST’ declared here as ‘class clang::TestAST’
   72 | class TestAST {
      |       ^~~~~~~
765.833 [1333/71/5229] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/MacroExpansionContextTest.cpp.o
765.917 [1333/70/5230] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Lex/PPCallbacksTest.cpp.o
766.300 [1333/69/5231] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Interpreter.cpp.o
766.632 [1333/68/5232] Building CXX object tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/ClangScanDeps.cpp.o
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:19,
                 from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:17,
                 from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:13,
                 from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/tools/clang-scan-deps/ClangScanDeps.cpp:15:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:255:16: warning: ‘virtual bool clang::ASTReaderListener::visitInputFile(llvm::StringRef, llvm::StringRef, bool, bool, bool)’ was hidden [-Woverloaded-virtual]
  255 |   virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
      |                ^~~~~~~~~~~~~~
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/clang/include/clang/Serialization/ASTReader.h:319:8: note:   by ‘virtual bool clang::ChainedASTReaderListener::visitInputFile(llvm::StringRef, bool, bool, bool)’
  319 |   bool visitInputFile(StringRef Filename, bool isSystem,
      |        ^~~~~~~~~~~~~~
766.790 [1333/67/5233] Linking CXX executable bin/clang-nvlink-wrapper
767.061 [1333/66/5234] Linking CXX executable bin/clang-sycl-linker
768.878 [1333/65/5235] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/APSIntTypeTest.cpp.o
770.242 [1333/64/5236] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ConflictingEvalCallsTest.cpp.o
770.383 [1333/63/5237] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ByteCode/BitcastBuffer.cpp.o
770.452 [1333/62/5238] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
771.243 [1333/61/5239] Linking CXX executable bin/clang-linker-wrapper
771.597 [1333/60/5240] Linking CXX executable bin/clang-check
771.870 [1333/59/5241] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/CallEventTest.cpp.o
772.159 [1333/58/5242] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/BlockEntranceCallbackTest.cpp.o
772.363 [1333/57/5243] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ObjcBug-124477.cpp.o
772.549 [1333/56/5244] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/Z3CrosscheckOracleTest.cpp.o
773.402 [1333/55/5245] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CFGMatchSwitchTest.cpp.o
773.465 [1333/54/5246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp.o
773.564 [1333/53/5247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ExprEngineVisitTest.cpp.o
773.622 [1333/52/5248] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp.o

mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
Refactor the Lifetime Safety Analysis infrastructure to support unit testing.

- Created a public API class `LifetimeSafetyAnalysis` that encapsulates the analysis functionality
- Added support for test points via a special `TestPointFact` that can be used to mark specific program points
- Added unit tests that verify loan propagation in various code patterns
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants