clang 24.0.0git
SharedLexicalRepresentationFormat.cpp File Reference
#include "SSAFAnalysesCommon.h"
#include "clang/ScalableStaticAnalysis/Analyses/SharedLexicalRepresentation/SharedLexicalRepresentation.h"
#include "clang/ScalableStaticAnalysis/Core/Serialization/JSONFormat.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.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
namespace  clang::ssaf

Functions

EntitySourceLocationsSummary clang::ssaf::buildEntitySourceLocationsSummary (std::vector< SourceLocationRecord > Locs)
llvm::ArrayRef< SourceLocationRecordclang::ssaf::getDeclLocations (const EntitySourceLocationsSummary &S)
static Object sourceLocationRecordToJSON (const SourceLocationRecord &R)
static llvm::Expected< SourceLocationRecordsourceLocationRecordFromJSON (const Value &V)
static Object serialize (const EntitySummary &ES, JSONFormat::EntityIdToJSONFn)
static llvm::Expected< std::unique_ptr< EntitySummary > > deserialize (const Object &Data, EntityIdTable &, JSONFormat::EntityIdFromJSONFn)
static llvm::Registry< JSONFormat::FormatInfo >::Add< SharedLexicalRepresentationJSONFormatInfo > RegisterSharedLexicalRepresentationJSONFormatInfo (EntitySourceLocationsSummary::Name, "JSON Format info for EntitySourceLocationsSummary")

Variables

static constexpr llvm::StringLiteral DeclLocationsKey = "decl_locations"
static constexpr llvm::StringLiteral FilePathKey = "file_path"
static constexpr llvm::StringLiteral LineKey = "line"
static constexpr llvm::StringLiteral ColumnKey = "column"
volatile int clang::ssaf::SharedLexicalRepresentationJSONFormatAnchorSource = 0

Function Documentation

◆ deserialize()

◆ RegisterSharedLexicalRepresentationJSONFormatInfo()

llvm::Registry< JSONFormat::FormatInfo >::Add< SharedLexicalRepresentationJSONFormatInfo > RegisterSharedLexicalRepresentationJSONFormatInfo ( EntitySourceLocationsSummary::Name ,
"JSON Format info for EntitySourceLocationsSummary"  )
static

◆ serialize()

◆ sourceLocationRecordFromJSON()

llvm::Expected< SourceLocationRecord > sourceLocationRecordFromJSON ( const Value & V)
static

◆ sourceLocationRecordToJSON()

Object sourceLocationRecordToJSON ( const SourceLocationRecord & R)
static

Definition at line 45 of file SharedLexicalRepresentationFormat.cpp.

References ColumnKey, FilePathKey, and LineKey.

Referenced by serialize().

Variable Documentation

◆ ColumnKey

llvm::StringLiteral ColumnKey = "column"
staticconstexpr

◆ DeclLocationsKey

llvm::StringLiteral DeclLocationsKey = "decl_locations"
staticconstexpr

Definition at line 40 of file SharedLexicalRepresentationFormat.cpp.

Referenced by deserialize(), and serialize().

◆ FilePathKey

llvm::StringLiteral FilePathKey = "file_path"
staticconstexpr

◆ LineKey

llvm::StringLiteral LineKey = "line"
staticconstexpr