clang 23.0.0git
clang::ssaf::AnalysisDriver Class Referencefinal

Orchestrates whole-program analysis over an LUSummary. More...

#include "clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/AnalysisDriver.h"

Public Member Functions

 AnalysisDriver (std::unique_ptr< LUSummary > LU)
llvm::Expected< WPASuiterun () &&
 Runs all registered analyses in topological dependency order.
llvm::Expected< WPASuiterun (llvm::ArrayRef< AnalysisName > Names) const
 Runs only the named analyses (plus their transitive dependencies).
template<typename... ResultTs>
llvm::Expected< WPASuiterun () const
 Type-safe variant of run(names).

Detailed Description

Orchestrates whole-program analysis over an LUSummary.

Three run() patterns are supported:

  • run() && – all registered analyses in topological dependency order. Returns an error if any registered analysis has no matching entity data in the LUSummary. Requires an rvalue driver because this exhausts the LUSummary.
  • run(names) – named subset plus transitive dependencies; returns Expected and fails if any listed name has no registered analysis or missing entity data.
  • run<ResultTs..> – type-safe variant of run(names).

Definition at line 43 of file AnalysisDriver.h.

Constructor & Destructor Documentation

◆ AnalysisDriver()

AnalysisDriver::AnalysisDriver ( std::unique_ptr< LUSummary > LU)
explicit

Definition at line 23 of file AnalysisDriver.cpp.

Member Function Documentation

◆ run() [1/3]

llvm::Expected< WPASuite > AnalysisDriver::run ( ) &&
nodiscard

Runs all registered analyses in topological dependency order.

Returns an error if any registered analysis has no matching entity data in the LUSummary.

Requires an rvalue driver (std::move(Driver).run()) because this exhausts all remaining LUSummary data.

Definition at line 196 of file AnalysisDriver.cpp.

References clang::ssaf::AnalysisRegistry::names().

◆ run() [2/3]

template<typename... ResultTs>
llvm::Expected< WPASuite > clang::ssaf::AnalysisDriver::run ( ) const
inlinenodiscard

Type-safe variant of run(names).

Derives names from ResultTs::analysisName().

Definition at line 67 of file AnalysisDriver.h.

References run().

Referenced by run().

◆ run() [3/3]

llvm::Expected< WPASuite > AnalysisDriver::run ( llvm::ArrayRef< AnalysisName > Names) const
nodiscard

Runs only the named analyses (plus their transitive dependencies).

Returns an error if any listed AnalysisName has no registered analysis or if a required SummaryAnalysis has no matching entity data in the LUSummary. The EntityIdTable is copied (not moved) so the driver remains usable for subsequent calls.

Definition at line 205 of file AnalysisDriver.cpp.


The documentation for this class was generated from the following files: