9#ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_ANALYSES_VIRTUALMETHODFAMILY_VIRTUALMETHODFAMILY_H
10#define LLVM_CLANG_SCALABLESTATICANALYSIS_ANALYSES_VIRTUALMETHODFAMILY_VIRTUALMETHODFAMILY_H
17#include "llvm/ADT/DenseMap.h"
18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/raw_ostream.h"
27 static constexpr llvm::StringLiteral
Name =
"VirtualMethod";
44 std::tie(
Other.ParamEntities,
Other.ReturnEntity,
45 Other.OverriddenMethods);
49 return !(*
this ==
Other);
55llvm::raw_ostream &
operator<<(llvm::raw_ostream &OS,
56 const VirtualMethodSummary &S);
60 return AnalysisName(
"VirtualMethodFamilyAnalysisResult");
72 return !(*
this ==
Other);
78llvm::raw_ostream &
operator<<(llvm::raw_ostream &OS,
79 const VirtualMethodFamilyAnalysisResult &R);
Uniquely identifies a whole-program analysis and the AnalysisResult it produces.
Base class for whole-program analysis results.
Base class for analysis-specific summary data.
Uniquely identifies an analysis summary.
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const VirtualMethodSummary &S)
Prints S as "VirtualMethodSummary { params=[...], return=..., overridden=[...] }".
@ Other
Other implicit parameter.
bool operator!=(const VirtualMethodFamilyAnalysisResult &Other) const
bool operator==(const VirtualMethodFamilyAnalysisResult &Other) const
static AnalysisName analysisName()
llvm::DenseMap< EntityId, EntityId > RetAndParamData
Maps each parameter or return slot to the ID of the family it belongs to.
static constexpr llvm::StringLiteral Name
bool operator!=(const VirtualMethodSummary &Other) const
static SummaryName summaryName()
bool operator==(const VirtualMethodSummary &Other) const
std::vector< EntityId > ParamEntities
EntityIds of each ParmVarDecl, in source order.
SummaryName getSummaryName() const override
std::optional< EntityId > ReturnEntity
EntityId of the synthetic return-slot entity for this method.
std::vector< EntityId > OverriddenMethods
The result of CXXMethodDecl::overridden_methods().