clang 24.0.0git
VirtualMethodFamilyFormat.cpp File Reference
#include "SSAFAnalysesCommon.h"
#include "clang/ScalableStaticAnalysis/Analyses/VirtualMethodFamily/VirtualMethodFamily.h"
#include "clang/ScalableStaticAnalysis/Core/Serialization/JSONFormat.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Registry.h"
#include <memory>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  Expected< T >

Namespaces

namespace  clang
 Top level wrappers for InstallAPI frontend operations.
namespace  clang::ssaf

Functions

static Array entityIdVectorToJSON (const std::vector< EntityId > &Ids, JSONFormat::EntityIdToJSONFn IdToJSON)
static Expected< std::vector< EntityId > > entityIdVectorFromJSON (const Array &Arr, JSONFormat::EntityIdFromJSONFn IdFromJSON)
static Object serializeVirtualMethodSummary (const EntitySummary &ES, JSONFormat::EntityIdToJSONFn IdToJSON)
static Expected< std::unique_ptr< EntitySummary > > deserializeVirtualMethodSummary (const Object &Obj, EntityIdTable &, JSONFormat::EntityIdFromJSONFn IdFromJSON)
static Object serializeVirtualMethodFamilyAnalysisResult (const VirtualMethodFamilyAnalysisResult &R, JSONFormat::EntityIdToJSONFn IdToJSON)
static Expected< std::unique_ptr< AnalysisResult > > deserializeVirtualMethodFamilyAnalysisResult (const Object &Obj, JSONFormat::EntityIdFromJSONFn IdFromJSON)
static llvm::Registry< JSONFormat::FormatInfo >::Add< VirtualMethodSummaryJSONFormatInfo > RegisterJSONFormat (VirtualMethodSummary::Name, "JSON Format info for VirtualMethodSummary")
static JSONFormat::AnalysisResultRegistry::Add< VirtualMethodFamilyAnalysisResult > RegisterResultJSONFormat (serializeVirtualMethodFamilyAnalysisResult, deserializeVirtualMethodFamilyAnalysisResult)

Variables

volatile int clang::ssaf::VirtualMethodFamilyJSONFormatAnchorSource = 0

Function Documentation

◆ deserializeVirtualMethodFamilyAnalysisResult()

Expected< std::unique_ptr< AnalysisResult > > deserializeVirtualMethodFamilyAnalysisResult ( const Object & Obj,
JSONFormat::EntityIdFromJSONFn IdFromJSON )
static

Definition at line 133 of file VirtualMethodFamilyFormat.cpp.

References clang::ssaf::makeSawButExpectedError(), and V.

Referenced by RegisterResultJSONFormat().

◆ deserializeVirtualMethodSummary()

Expected< std::unique_ptr< EntitySummary > > deserializeVirtualMethodSummary ( const Object & Obj,
EntityIdTable & ,
JSONFormat::EntityIdFromJSONFn IdFromJSON )
static

◆ entityIdVectorFromJSON()

Expected< std::vector< EntityId > > entityIdVectorFromJSON ( const Array & Arr,
JSONFormat::EntityIdFromJSONFn IdFromJSON )
static

◆ entityIdVectorToJSON()

Array entityIdVectorToJSON ( const std::vector< EntityId > & Ids,
JSONFormat::EntityIdToJSONFn IdToJSON )
static

Definition at line 37 of file VirtualMethodFamilyFormat.cpp.

Referenced by serializeVirtualMethodSummary().

◆ RegisterJSONFormat()

llvm::Registry< JSONFormat::FormatInfo >::Add< VirtualMethodSummaryJSONFormatInfo > RegisterJSONFormat ( VirtualMethodSummary::Name ,
"JSON Format info for VirtualMethodSummary"  )
static

◆ RegisterResultJSONFormat()

◆ serializeVirtualMethodFamilyAnalysisResult()

Object serializeVirtualMethodFamilyAnalysisResult ( const VirtualMethodFamilyAnalysisResult & R,
JSONFormat::EntityIdToJSONFn IdToJSON )
static

Definition at line 116 of file VirtualMethodFamilyFormat.cpp.

Referenced by RegisterResultJSONFormat().

◆ serializeVirtualMethodSummary()

Object serializeVirtualMethodSummary ( const EntitySummary & ES,
JSONFormat::EntityIdToJSONFn IdToJSON )
static

Definition at line 68 of file VirtualMethodFamilyFormat.cpp.

References entityIdVectorToJSON().